2012.10.11 22:20 "Re: [Tiff] TIFFTAG_EXIFIFD tag type change in libTIFF 4.0.x?", by Bob Friesenhahn
I have recently started working on migrating from libTIFF 3.9.5 to 4.0.3. I was running some regression testing on image metadata for my platform and ran into some snags with EXIF. Specifically, it looks like the tag type in tif_dirinfo.c for TIFFTAG_EXIFIFD was changed from TIFF_LONG to TIFF_IFD8. When writing a TIFF the file ends up with tag type 13 (TIFF_IFD) for TIFFTAG_EXIFIFD. Unfortunately our EXIF parser expects the EXIFIFD offset to be of tag type 4 (LONG) and doesn't follow the offset to the subifd.
The following both specify that it should be type LONG
Without even looking into this issue, I should mention that due to libtiff 4 supporting the new BigTIFF format (supports huge files via 64-bit offsets), offsets are now produced/consumed as 64-bit unsigned types. Functions which now return a 64-bit type may also return an error code as -1 cast to the 64-bit unsigned type so it is very important that the return type size is 64-bit unsigned or else error handling won't work right (i.e. don't accidentially assign to a 32-bit value). These are the main changes to the previously existing libtiff API.
See the text associated with the 4.0.0 release at "http://www.remotesensing.org/libtiff/v4.0.0.html".
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/