2009.09.24 16:38 "[Tiff] TIFFTAG_RICHTIFFIPTC vs my life...", by Chris Losinger

2009.09.24 16:38 "[Tiff] TIFFTAG_RICHTIFFIPTC vs my life...", by Chris Losinger

There are a number of TIFF writers out there which write IPTC data with the type TIFF_UNDEFINED instead of TIFF_LONG. And this means that LibTiff ignores those tags - much to my users' dismay.

So, has anyone found a way to teach LibTiff to allow TIFFTAG_RICHTIFFIPTC to be read when it's been saved as TIFF_UNDEFINED?

I can kindof see a way to do it - starting by teaching the 'wrong data type' check in TIFFReadDirectory to allow the exception; but then OkToChangeTag tells TIFFVSetField to use the built-in type for that tag (TIFF_LONG instead of TIFF_UNDEFINIED), and that means all the mallocs and memcpys which follow are too large by a factor of 4.

Without teaching OkToChangeTag about the exception, and then finding the next snag, which could take forever, I was hoping to see that someone else had found a solid solution to the problem and would be willing to share...

Anyone?

        -c

----
Chris Losinger
losinger@earthlink.net
smallest@smalleranimals.com http://www.smalleranimals.com