Main Menu

Tag sequence

Started by BogdanH, July 31, 2011, 07:49:34 AM

Previous topic - Next topic

BogdanH

Hi Phil,

I've read Exif specifications, but couldn't find definitive answer (or I've missed it). The question is:
Do tags need to be put into IFD in increasing sequence, or is doing that just a good practice? That is, is it allowed (by standard), that i.e. tag IFD0:Model (0x0110) is put before IFD0:Make (0x010f)?
And related to this: as values of above tags are (must be) saved outside IFD0 section, do these values need to follow the sequence of tags?
According to IFD:Tag entry structure, increasing sequence isn't really needed, because we deal with offsets (to tag values) anyway. Of course, it's good to see tag entries/values increasing nicely (say, easier to read/write).. but can I assume that's allways the case? When reading, does ExifTool "asumme" that?

Bogdan
P.S. I'm not sure, if this belong in this forum section ..feel free to move elsewhere.

Phil Harvey

This is stated clearly in the TIFF specification.  Tags must be sorted by increasing number order in IFD's.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

I should also mention that ExifTool will issue a warning like this and fix the problem when writing if the the tags aren't ordered properly:

    Entries in IFD0 were out of sequence. Fixed.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).