2005.03.17 03:53 "Re: [Tiff] libtiff and EXIF", by Bob Friesenhahn
I've been looking at what is required to parse exif data using libtiff, and it looks like surprisingly little. It was trivial to bypass enough sanity checks to easily get it to recognise and read the ExifIFD and auto register all the tags it found there. And not that much harder to get it to recognise a similar tiff'ette extracted from the APP1 section of a jpeg file with exif data and then fed to libtiff.
So the biggest question is how you all feel about supporting this from libtiff. Obviously TIFFFieldInfo for exif tags, if people wanted them,
It is intended the libtiff support it, or at least cleanly allow it. I was about to dive into this myself. Please post a clean patch against the libtiff CVS version to libtiff's bugzilla at "http://bugzilla.remotesensing.org/enter_bug.cgi?product=libtiff". That should hasten getting some support into libtiff.
could be cleanly separated from the main lib, so the main issue would be how to provide the necessary functions for generic IFD handling. (generic tags are already handled beautifully)
The easy way is to just provide some alternative functions, that (ab)use the existing structures as my proof of concept does, without the operations that are specific to valid .tif, but not found in exif data. The harder, but long term more rewarding way, would be to factor out a generic IFD interface, and reimplement the strictures of TIFF vX.Y on top of that. Harder because it probably means breaking the ABI (at least) to split common parts out of existing structures -- which is a pretty extreme step to add support for something not strictly tiff but might be justified in other ways all the same.
Perhaps this can be a task for libtiff 4.0.
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/