2010.09.08 19:06 "Re: [Tiff] broken interface for TIFFTAG_SMINSAMPLEVALUE", by Bob Friesenhahn
libtiff chooses to handle data as double (converting from/to the required type on read/write of the directory) which is fine as it makes user code simpler. But libtiff also chooses to present the tag as having only a single value, replicating that value SamplesPerPixel times when writing the directory. This makes using the tag nearly impossible in my case as I need to set and retrieve the different values per sample.
Does libtiff currently support any channel-specific tags (other than via duplication)? For one reason or another this historically has seemed like a bad thing.
I propose changing the interface so TIFFSetField/TIFFGetField deal with the tags as arrays. This would of course quietly break the interface for any application which uses libtiff to read/write these tags. For this reason, I'd put the change in libtiff4 only. Any objections? Or better ideas?
Breaking the interface seems like a bad idea. It would certainly cause my own software to malfunction.
Perhaps it is better to add new functions which support access to channel-specific tags?
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/