ExifTool Forum

General => Metadata => Topic started by: BogdanH on July 31, 2011, 07:49:34 AM

Title: Tag sequence
Post by: BogdanH on July 31, 2011, 07:49:34 AM
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.
Title: Re: Tag sequence
Post by: Phil Harvey on July 31, 2011, 10:23:53 AM
This is stated clearly in the TIFF specification.  Tags must be sorted by increasing number order in IFD's.

- Phil
Title: Re: Tag sequence
Post by: Phil Harvey on August 06, 2011, 04:35:12 PM
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