| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2010.06.14 06:09 "Re: libtiff and IPTC tag", by Joris Van DammeAndreas, > 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. - The best way to write, is using BYTE or UNDEFINED. - The best way to read, is interpret BYTE or UNDEFINED as expected. - If datatype is LONG instead, read in your normal way (which probably 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 |
|||||||