2010.06.12 07:36 "[Tiff] libtiff and IPTC tag", by Andreas Kleinert

2010.06.14 06:09 "Re: [Tiff] libtiff and IPTC tag", by

Andreas,

However in tif_dirinfo.c within TIFFFieldInfo it is defined that libtiff expects LONG for TIFFTAG_RICHTIFFIPTC (custom field)...

This is the story of the egg and the many, many chickens.

Originally, there was one manufacturer that got it wrong, used LONG while the data is of mixed datatype, and therefore only makes sense as BYTE or UNDEFINED on the TIFF level. Adobe chose to duplicate that mistake, so as to remain compatible. LibTiff chose to duplicate Adobe's mistate, so as to

remain compatible. As many chickens were hatched from that very first egg, endianness issues became aparant. Some brew complicated code to correct that, so as to remain compatible... But often that sort of code is either absent, or not working fully correctly. Hence, the attempts to remain compatible, turned out at least partly futile.

includes byteswapping if endianness of file and machine don't match). Next try and interpret the data. If it doesn't make sense as valid IPTC data, byteswap it again, and retry interpreting it.

Best regards,

Joris