Skip to content

Tag Name Syntax

Robin Mills edited this page Sep 2, 2021 · 8 revisions

The TagName syntax is a 3 part tuple in the syntax Family.Group.Tag. For Example Exif.Image.Make. There are three families: Exif, Iptc and Xmp.

The Exif tags are in a hierarchy. The Group indicates the IFD in which the tag was found. At the top are tags defined in the TIFF/EP specification and are named: Exif.Image.Tag.

Exif defines tags in the Image IFD called ExifTag (0x8769) and GPSTag (0x8825) which are both IFDs. The tags in those IFDs are in Group Photo and GPSInfo, so the tags are named: Exif.Photo.Tag and Exif.GPSInfo.Tag.

An IFD is an array of tags. Multiple arrays can be chained. In the Exif IFD, the second array normally contains thumbnail images. The tags in this array are named: Exif.Thumbnail.Tag.

Exif defines a tag called MakerNote (0x927c) which introduces the camera manufacturer's data. This is normally a short header followed by an IFD. Exif.Nikon.Tag are tags in the Nikon MakerNote. In addition to the Exif formatted tags, maker notes usually contain binary structures. For example: Exif.NikonPc.TagName are the fields in the PictureControl" structure stored in tag PictureControl in the Nikon MakerNote.

ExifTagNames

Exif Metadata is stored in a Tiff formatted sub-file of the image. The arrangements for the storage of this sub-file are defined by the file format. The Exif metadata is independent of the file format. The following drawing illustrates the design of a Tiff file.

Tiff File Layout

IPTC tags are simpler. IPTC is two level structure. There are 9 "sections" such as Envelope and Application2 for which the spec defines the tags. The Exiv2 Family.Group.Tag maps to Iptc.Section.Tag. For example: Iptc.Envelope.ModelVersion and Iptc.Application2.Caption.

XMP is represented in XMP and is therefore a heirarchical tree. The Exiv2 Family.Group.Tag maps to Xmp.Namespace.Tag. For example: Xmp.xmp.ModifyDate and Xmp.dc.description. Because XMP is both extensible and a tree, the tags can contain arrays (XmpSeq) and objects (XmpBag) of arbitrary complexity. The syntax of XMP tags is handled by (and documented by) the Adobe XMP SDK.

Clone this wiki locally