2005.03.17 06:00 "Re: [Tiff] libtiff and EXIF", by Joris Van Damme
Perhaps this can be a task for libtiff 4.0.
I'm not a C coder, so what the heck do I know, but I still stand by what I suggested way back in http://www.asmail.be/msg0054569097.html and subsequent. I feel this would *NOT* have to break current call protocols.
- Adding a single field to current field info constants. This field would be 0 for most tags. For ExifIFD tag, it would be non-zero, indicating that the tag has IFD pointing intent, and also indicating the index into private, seperate field info name-spaces.
- Adding such private, seperate field info name-spaces (I suspect I can save typing by generating the proper C source format from the Tag Directory data).
- Reworking the current TIFFReadDirectory to take an additional parameter. This additional parameter is the tag name-space index. Thus, 0 means image IFD, 1 could mean EXIF IFD namespace, etc. This reworked TIFFReadDirectory is made to skip most of its normal image IFD specific handling if the name-space index is not 0, and can thus work on EXIF IFDs.
- To not break current call protocol, make this reworked TIFFReadDirectory a new function, say TIFFReadDirectoryNs. The new implementation of TIFFReadDirectory(...) is then simply a call to TIFFReadDirectoryNs(...,0). Current calls of TIFFReadDirectory are thus not broken, the call protocol of this function is not changes, and it still does exactly what it currently does, i.e. read an image IFD.
- New stuff can now be added to call TIFFReadDirectoryNs with a specific tag name-space that can for instance be the EXIF name-space. An example of such new stuff could be a TIFFSetExifDirectory function, similar to the current TIFFSetSubDirectory.
Please be patient if I'm being stupid, I'm not a C coder and don't even have a clue what ABI is.
My question is, is the above suggested scheme, that does no break consistency and does not involve code duplication, breaking any applications or any sorts of ABI whatever it is? If not, is it feasable and sufficient?
Joris Van Damme
Download your free TIFF tag viewer for windows here: