2004.11.14 10:33 "Re: [Tiff] EXIF tags", by Joris
You'll need to add the concept of 'tag namespace' to LibTiff anyway, to support EXIF IFDs, if that's what you're doing, and in either case, it does seem to be the right way to handle it and does not seem to yield any problem.
Such a concept already exist in libtiff. We have a static tiffFieldInfo array which contains all 'known' tags. We can create similar arrays for tags defined in the private IFDs.
That is indeed what I was talking about. Similar arrays, plus, an extra field that can point to such a similar array. Thus, when decending down the EXIF IFD tag, the code can know from this extra field that it'll have to use this other similar array.
Plus, this 'namespace indicator' aka tiffFieldInfo array pointer could possibly be used as an extra parameter to TIFFReadDirectory, allowing this routine to skip much of the normal action when namespace isn't normal image IFD namespace, thus helping LibTiff to not expect a TIFFTAG_IMAGEWIDTH and such in an IFD with an secondary namespace.
But, again, I'm not a C coder, I could be way off when it comes to implementation details.
Joris Van Damme
Download your free TIFF tag viewer for windows here: http://www.awaresystems.be/imaging/tiff/astifftagviewer.html