Skip to content

Commit 4726e25

Browse files
committed
feat: add common tag constants for IPTC, XMP, and ICC specs
- IPTC: core identification, date/time, creator, location, description - XMP: Dublin Core, basic, rights, photoshop, tiff, exif namespaces - ICC: profile header, color tags, device info
1 parent 8229227 commit 4726e25

File tree

1 file changed

+187
-0
lines changed

1 file changed

+187
-0
lines changed

tags.go

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package imx
22

3+
// =============================================================================
4+
// EXIF Tags
5+
// =============================================================================
6+
37
// Common EXIF tag constants for easy access
48

59
// Camera and Device Tags
@@ -161,3 +165,186 @@ const (
161165
TagRating TagID = "Exif:Rating"
162166
TagRatingPercent TagID = "Exif:RatingPercent"
163167
)
168+
169+
// =============================================================================
170+
// IPTC Tags
171+
// =============================================================================
172+
173+
// IPTC Core Identification Tags
174+
const (
175+
TagIPTCObjectName TagID = "IPTC:ObjectName" // Title/headline reference
176+
TagIPTCUrgency TagID = "IPTC:Urgency" // 1=most urgent, 8=least
177+
TagIPTCCategory TagID = "IPTC:Category" // Subject category code
178+
TagIPTCKeywords TagID = "IPTC:Keywords" // Keywords for indexing
179+
TagIPTCFixtureID TagID = "IPTC:FixtureID" // Identifies recurring events
180+
TagIPTCEditStatus TagID = "IPTC:EditStatus" // Status of object
181+
TagIPTCSpecialInstr TagID = "IPTC:SpecialInstr" // Special instructions
182+
)
183+
184+
// IPTC Date/Time Tags
185+
const (
186+
TagIPTCDateCreated TagID = "IPTC:DateCreated" // Intellectual content created
187+
TagIPTCTimeCreated TagID = "IPTC:TimeCreated" // Time content created
188+
TagIPTCDigitalCreationDate TagID = "IPTC:DigitalCreationDate" // Digital file created
189+
TagIPTCDigitalCreationTime TagID = "IPTC:DigitalCreationTime" // Digital file time
190+
TagIPTCReleaseDate TagID = "IPTC:ReleaseDate" // Earliest release date
191+
TagIPTCReleaseTime TagID = "IPTC:ReleaseTime" // Earliest release time
192+
TagIPTCExpirationDate TagID = "IPTC:ExpirationDate" // Latest use date
193+
)
194+
195+
// IPTC Creator/Author Tags
196+
const (
197+
TagIPTCByline TagID = "IPTC:Byline" // Creator/author name
198+
TagIPTCBylineTitle TagID = "IPTC:BylineTitle" // Creator's title/position
199+
TagIPTCCredit TagID = "IPTC:Credit" // Provider credit line
200+
TagIPTCSource TagID = "IPTC:Source" // Original owner/creator
201+
TagIPTCCopyrightNotice TagID = "IPTC:CopyrightNotice" // Copyright notice
202+
TagIPTCContact TagID = "IPTC:Contact" // Contact information
203+
TagIPTCWriterEditor TagID = "IPTC:WriterEditor" // Caption writer
204+
)
205+
206+
// IPTC Location Tags
207+
const (
208+
TagIPTCCity TagID = "IPTC:City" // City of origin
209+
TagIPTCSublocation TagID = "IPTC:Sublocation" // Location within city
210+
TagIPTCProvinceState TagID = "IPTC:ProvinceState" // Province/State
211+
TagIPTCCountryCode TagID = "IPTC:CountryCode" // ISO 3166 country code
212+
TagIPTCCountryName TagID = "IPTC:CountryName" // Full country name
213+
TagIPTCContentLocCode TagID = "IPTC:ContentLocCode" // Content location code
214+
TagIPTCContentLocName TagID = "IPTC:ContentLocName" // Content location name
215+
)
216+
217+
// IPTC Description Tags
218+
const (
219+
TagIPTCHeadline TagID = "IPTC:Headline" // Publishable headline
220+
TagIPTCCaptionAbstract TagID = "IPTC:CaptionAbstract" // Description/caption
221+
TagIPTCOriginProgram TagID = "IPTC:OriginProgram" // Program that created file
222+
TagIPTCProgramVersion TagID = "IPTC:ProgramVersion" // Version of program
223+
TagIPTCTransmissionRef TagID = "IPTC:TransmissionRef" // Original reference/job ID
224+
)
225+
226+
// =============================================================================
227+
// XMP Tags
228+
// =============================================================================
229+
230+
// XMP Dublin Core (dc) Tags
231+
const (
232+
TagXMPTitle TagID = "XMP-dc:title" // Title of the work
233+
TagXMPCreator TagID = "XMP-dc:creator" // Creator/author
234+
TagXMPDescription TagID = "XMP-dc:description" // Description/caption
235+
TagXMPSubject TagID = "XMP-dc:subject" // Keywords/subjects
236+
TagXMPRights TagID = "XMP-dc:rights" // Copyright/rights info
237+
TagXMPDate TagID = "XMP-dc:date" // Date
238+
TagXMPFormat TagID = "XMP-dc:format" // MIME type
239+
TagXMPIdentifier TagID = "XMP-dc:identifier" // Unique identifier
240+
TagXMPLanguage TagID = "XMP-dc:language" // Language
241+
TagXMPPublisher TagID = "XMP-dc:publisher" // Publisher
242+
TagXMPRelation TagID = "XMP-dc:relation" // Related resources
243+
TagXMPSource TagID = "XMP-dc:source" // Source
244+
TagXMPType TagID = "XMP-dc:type" // Type/genre
245+
)
246+
247+
// XMP Basic (xmp) Tags
248+
const (
249+
TagXMPCreateDate TagID = "XMP-xmp:CreateDate" // Date created
250+
TagXMPModifyDate TagID = "XMP-xmp:ModifyDate" // Date modified
251+
TagXMPMetadataDate TagID = "XMP-xmp:MetadataDate" // Metadata last modified
252+
TagXMPCreatorTool TagID = "XMP-xmp:CreatorTool" // Application that created file
253+
TagXMPRating TagID = "XMP-xmp:Rating" // User rating (0-5)
254+
TagXMPLabel TagID = "XMP-xmp:Label" // Color label
255+
TagXMPBaseURL TagID = "XMP-xmp:BaseURL" // Base URL for relative URLs
256+
)
257+
258+
// XMP Rights (xmpRights) Tags
259+
const (
260+
TagXMPCertificate TagID = "XMP-xmpRights:Certificate" // Rights certificate
261+
TagXMPMarked TagID = "XMP-xmpRights:Marked" // Copyright marked
262+
TagXMPOwner TagID = "XMP-xmpRights:Owner" // Rights owner
263+
TagXMPUsageTerms TagID = "XMP-xmpRights:UsageTerms" // Usage terms
264+
TagXMPWebStatement TagID = "XMP-xmpRights:WebStatement" // Web rights statement
265+
)
266+
267+
// XMP Photoshop Tags
268+
const (
269+
TagXMPPhotoshopCity TagID = "XMP-photoshop:City" // City
270+
TagXMPPhotoshopState TagID = "XMP-photoshop:State" // State/Province
271+
TagXMPPhotoshopCountry TagID = "XMP-photoshop:Country" // Country
272+
TagXMPPhotoshopCredit TagID = "XMP-photoshop:Credit" // Credit line
273+
TagXMPPhotoshopSource TagID = "XMP-photoshop:Source" // Source
274+
TagXMPPhotoshopHeadline TagID = "XMP-photoshop:Headline" // Headline
275+
TagXMPPhotoshopInstructions TagID = "XMP-photoshop:Instructions" // Instructions
276+
TagXMPPhotoshopDateCreated TagID = "XMP-photoshop:DateCreated" // Date created
277+
TagXMPPhotoshopAuthorsPos TagID = "XMP-photoshop:AuthorsPosition" // Author's position
278+
TagXMPPhotoshopCaptionWriter TagID = "XMP-photoshop:CaptionWriter" // Caption writer
279+
TagXMPPhotoshopCategory TagID = "XMP-photoshop:Category" // Category
280+
TagXMPPhotoshopColorMode TagID = "XMP-photoshop:ColorMode" // Color mode
281+
TagXMPPhotoshopICCProfile TagID = "XMP-photoshop:ICCProfile" // ICC profile name
282+
)
283+
284+
// XMP TIFF Tags (via XMP)
285+
const (
286+
TagXMPTIFFMake TagID = "XMP-tiff:Make" // Camera make
287+
TagXMPTIFFModel TagID = "XMP-tiff:Model" // Camera model
288+
TagXMPTIFFOrientation TagID = "XMP-tiff:Orientation" // Image orientation
289+
TagXMPTIFFXResolution TagID = "XMP-tiff:XResolution" // X resolution
290+
TagXMPTIFFYResolution TagID = "XMP-tiff:YResolution" // Y resolution
291+
TagXMPTIFFImageWidth TagID = "XMP-tiff:ImageWidth" // Image width
292+
TagXMPTIFFImageLength TagID = "XMP-tiff:ImageLength" // Image height
293+
)
294+
295+
// XMP EXIF Tags (via XMP)
296+
const (
297+
TagXMPExifDateTimeOriginal TagID = "XMP-exif:DateTimeOriginal" // Date/time taken
298+
TagXMPExifExposureTime TagID = "XMP-exif:ExposureTime" // Exposure time
299+
TagXMPExifFNumber TagID = "XMP-exif:FNumber" // Aperture
300+
TagXMPExifISOSpeedRatings TagID = "XMP-exif:ISOSpeedRatings" // ISO
301+
TagXMPExifFocalLength TagID = "XMP-exif:FocalLength" // Focal length
302+
TagXMPExifFlash TagID = "XMP-exif:Flash" // Flash info
303+
TagXMPExifGPSLatitude TagID = "XMP-exif:GPSLatitude" // GPS latitude
304+
TagXMPExifGPSLongitude TagID = "XMP-exif:GPSLongitude" // GPS longitude
305+
TagXMPExifGPSAltitude TagID = "XMP-exif:GPSAltitude" // GPS altitude
306+
)
307+
308+
// =============================================================================
309+
// ICC Tags
310+
// =============================================================================
311+
312+
// ICC Profile Header Tags
313+
const (
314+
TagICCProfileDescription TagID = "ICC:ProfileDescription" // Profile description
315+
TagICCCopyright TagID = "ICC:Copyright" // Copyright notice
316+
TagICCProfileClass TagID = "ICC:ProfileClass" // Profile class
317+
TagICCColorSpace TagID = "ICC:ColorSpace" // Color space
318+
TagICCPCS TagID = "ICC:PCS" // Profile connection space
319+
TagICCProfileVersion TagID = "ICC:ProfileVersion" // Profile version
320+
TagICCDeviceManufacturer TagID = "ICC:DeviceManufacturer" // Device manufacturer
321+
TagICCDeviceModel TagID = "ICC:DeviceModel" // Device model
322+
TagICCRenderingIntent TagID = "ICC:RenderingIntent" // Rendering intent
323+
TagICCCreationDate TagID = "ICC:CreationDate" // Profile creation date
324+
TagICCPlatform TagID = "ICC:Platform" // Primary platform
325+
TagICCCMMType TagID = "ICC:CMMType" // CMM type
326+
)
327+
328+
// ICC Color Tags
329+
const (
330+
TagICCMediaWhitePoint TagID = "ICC:MediaWhitePoint" // Media white point XYZ
331+
TagICCMediaBlackPoint TagID = "ICC:MediaBlackPoint" // Media black point XYZ
332+
TagICCRedColorant TagID = "ICC:RedColorant" // Red matrix column
333+
TagICCGreenColorant TagID = "ICC:GreenColorant" // Green matrix column
334+
TagICCBlueColorant TagID = "ICC:BlueColorant" // Blue matrix column
335+
TagICCRedTRC TagID = "ICC:RedTRC" // Red tone curve
336+
TagICCGreenTRC TagID = "ICC:GreenTRC" // Green tone curve
337+
TagICCBlueTRC TagID = "ICC:BlueTRC" // Blue tone curve
338+
TagICCGrayTRC TagID = "ICC:GrayTRC" // Gray tone curve
339+
TagICCLuminance TagID = "ICC:Luminance" // Luminance value
340+
TagICCChromaticAdaptation TagID = "ICC:ChromaticAdaptation" // Chromatic adaptation
341+
)
342+
343+
// ICC Device Tags
344+
const (
345+
TagICCDeviceMfgDesc TagID = "ICC:DeviceMfgDesc" // Device manufacturer description
346+
TagICCDeviceModelDesc TagID = "ICC:DeviceModelDesc" // Device model description
347+
TagICCTechnology TagID = "ICC:Technology" // Device technology
348+
TagICCViewingCondDesc TagID = "ICC:ViewingCondDesc" // Viewing conditions description
349+
TagICCMeasurement TagID = "ICC:Measurement" // Measurement info
350+
)

0 commit comments

Comments
 (0)