2012.10.11 21:56 "[Tiff] TIFFTAG_EXIFIFD tag type change in libTIFF 4.0.x?", by Andrew Pangborn

2012.10.11 21:56 "[Tiff] TIFFTAG_EXIFIFD tag type change in libTIFF 4.0.x?", by Andrew Pangborn

Hi,

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 http://www.awaresystems.be/imaging/tiff/tifftags/exififd.html http://www.cipa.jp/english/hyoujunka/kikaku/pdf/DC-008-2010_E.pdf

This is contrary to what I have now found as part of the TIFF supplemental from Adobe http://partners.adobe.com/public/developer/en/tiff/TIFFPM6.pdf

Is this expected behavior? I notice that the type is changing from TIFF_IFD8 to TIFF_IFD. Perhaps it should maintain the use of "LONG" when writing classic TIFF?

Is there an elegant / preferred way to address this issue? It's not clear to me if the tag extension mechanism can be used to change the behavior of existing tags, or only add new ones.

Thanks,
-Andrew