2016.03.18 14:03 "Re: [Tiff] Wrong data type of GPS_IFD and EXIF_IFD tags and other issues", by Fran=c3=a7ois-Xavier_Thomas
I've recently spent a few hours debugging a really strange issue where some TIFF images we use had unreadable EXIF and GPS tags using Exempi (the tag processing library we are using).
After a while, I found out that the images were all produced by LibTiff 4.0, and the TIFFTAG_EXIFIFD and TIFFTAG_GPSIFD both had type TIFF_IFD (13) instead of TIFF_LONG (4), which Exempi doesn't support.
Here is what I could find in various specs:
- TIFF 6.0 uses TIFF_LONG
- EXIF 2.2 uses TIFF_LONG
- EXIF 2.3 uses TIFF_LONG
- Tech notes for PageMaker uses TIFF_IFD8 (and is the only one)
Someone already sent an email about this a few months back. I'm not sure I can reply to the original thread since I just subscribed to the mailing list, but I cc'd the poster.
Anyway, the following libraries don't support TIFF_IFD8 at all and were only able to read EXIF/GPS metadata with TIFF_LONG:
- Adobe XMP SDK C++ (all versions I could find up to the latest)
- libexempi (2.2 from Ubuntu)
- libexempi (2.3 and not-yet-released 2.4, compiled myself)
- libexif (0.6.21 from the Ubuntu repos)
- exifprobe (2.0.1 from the Ubuntu repos)
- exifread (2.1.2 from PyPi)
- metadata-extractor (Android lib using the Java version of the XMP SDK)
- As you can see, the current LibTiff produces TIFF tags that are unreadable for a wide range of libraries.
- Is there a spec somewhere that mentions the TIFF_IFD tag and its use for EXIF metadata? I'd be more comfortable in knowing that this is somewhat official.
- What's the opinion of the LibTiff developers regarding this? Are patches welcome that would allow LibTiff to support both types?
- Can LibTiff be forced to output TIFF_LONG instead of TIFF_IFD without having to patch it?
- At the moment I'm relying on a patched version of Exempi, which is definitely not ideal ; any help is appreciated!
 https://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf  http://www.exif.org/Exif2-2.PDF  http://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf  https://partners.adobe.com/public/developer/en/tiff/TIFFPM6.pdf  http://www.asmail.be/msg0055066050.html
François-Xavier Thomas -- Ingénieur traitement des images
48 rue René Clair
75899 Paris Cedex 18
09 72 39 75 82