2001.05.14 04:00 "Re: does tiffdump list tags in order?", by Niles Ritter
I've been tearing my hair out about this and I hope someone can help!
The basic question is: does tiffdump's output list the IFD fields in the order they appear in the TIFF file? (we're running libtiff version 3.5.5)
I've got TIFF files from two sources. Files from source A get an error message that the tags are not in ascending order from tiffinfo. The message also appears when using ImageMagick's identify feature. The tiffdump output does indeed look like they're out of order - 33432, 254, 256, 257, 258, 259, [several tags in order omitted], 296, 33723, 34377, 34675, 306, 315.
What confuses me is that files from source B do not get error messages from tiffinfo, but the output from tiffdump still looks out of order! 33432, 254, 256, 257, [several tags in order ommitted], 296, 34377, 34675, 37724, 306, 315. I know tiffinfo is ignoring the 33432, 34377, and 37724 tags, but it does recognize 34675 (ICC Profile), which is out of order on that list. But no error message!
Can anyone shed some light on this problem? "In order" means by decimal number, right? If tiffdump really doesn't give the tags in the order they appear in the file, does anyone know of a way of getting a tag list the way they appear in the file, non-ascending order and all (short of viewing the tiff file in an editor!)? Any help much appreciated.
tiffdump lists the tags in the order they are stored in the file, so you can be
sure that the orders you see are correct. The "tiffinfo" program uses the higher-level parsing libtiff routines, which will generate the "not in ascending order"
message. It is difficult to tell from glancing at the source exactly which tags it ignores,