-
2004.12.02 18:30 "Re: [Tiff] Having problems adding IPTC to a TIFF", by Andrey Kiselev
- 2004.12.02 21:40 "Re: [Tiff] Having problems adding IPTC to a TIFF", by Roland Rabien
-
2004.12.06 22:52 "Re: [Tiff] Having problems adding IPTC to a TIFF", by Joris Van Damme
-
2004.12.07 02:08 "Re: [Tiff] Having problems adding IPTC to a TIFF", by Bob Friesenhahn
-
2004.12.07 02:53 "Re: [Tiff] Having problems adding IPTC to a TIFF", by Joris Van Damme
-
2004.12.07 04:13 "Re: [Tiff] Having problems adding IPTC to a TIFF", by Bob Friesenhahn
- 2004.12.07 04:27 "Re: [Tiff] Having problems adding IPTC to a TIFF", by Chris Cox
-
2004.12.07 09:12 "Re: [Tiff] Having problems adding IPTC to a TIFF", by Joris Van Damme
-
2004.12.07 10:34 "Re: [Tiff] Having problems adding IPTC to a TIFF", by Eric Vergnaud
-
2004.12.07 11:06 "Re: [Tiff] Having problems adding IPTC to a TIFF", by Joris Van Damme
- 2004.12.07 17:06 "Re: [Tiff] Having problems adding IPTC to a TIFF", by Eric Vergnaud
-
2004.12.07 11:06 "Re: [Tiff] Having problems adding IPTC to a TIFF", by Joris Van Damme
-
2004.12.07 10:34 "Re: [Tiff] Having problems adding IPTC to a TIFF", by Eric Vergnaud
-
2004.12.07 04:13 "Re: [Tiff] Having problems adding IPTC to a TIFF", by Bob Friesenhahn
-
2004.12.07 02:53 "Re: [Tiff] Having problems adding IPTC to a TIFF", by Joris Van Damme
-
2004.12.07 02:08 "Re: [Tiff] Having problems adding IPTC to a TIFF", by Bob Friesenhahn
2004.12.07 02:53 "Re: [Tiff] Having problems adding IPTC to a TIFF", by Joris Van Damme
I have communicated with Bill Radcliffe, the one who wrote the IPTC utility distributed with libtiff, and the author of the TIFF IPTC support in ImageMagick/GraphicsMagick and he believes that libtiff is correct in using TIFF_LONG. Given that he has been working in this area for many years, I am strongly inclined to trust his opinion on this.
ImageMagick/GraphicsMagick include byte-swapping code to deal with IPTC coded in both big and little-endian forms. The endinness is expected to match that of the TIFF file (based on TIFFIsByteSwapped()).
Bob,
- The specification says that the IPTC data contains data of different bitsizes (byte, word, long, and undefined at the tag container level but anything on the IPTC tag level)
- The TIFF specification and TIFF logic says that such data should be of type undefined, or byte if you wish.
- Byteswapping data with members of different bitsizes as if it were an array of long, corrupts it.
- The need for post-byteswapping data as if it were an array of long, where in fact it is not, to uncorrupt it, in half of the cases, clearly shows something is wrong. That is not an endianness issue, it is downright data corruption.
- The IPTC specification clearly says <quote>If the binary numbers are formed by multiple octets, the bits forming any octet are presumed to be less significant than those of any octet to the left and more significant than those of any octet to the right. For example, if two octets, numbered left to right as 1 and 2, are taken together as a binary number, octet No. 1 will contain the most significant bits.</unquote>
- The need to uncorrupt by reswapping, is machine specific as much as TIFF byte order specific. If I were to write a motorola order TIFF on my intel machine, swapping is going on. If you reed that motorola order file with swapped IPTC data on your motorola order machine, you'll need to swap it to make sense of it. That goes against all logic.
- It's plain ridiculous we're even argueing about this, because the IPTC data isn't even necessarilly a multiple of four bytes long. Anyone who know that data structure will tell you so. So how can it be defined type TIFF_LONG??
Any insights based on the relevant specifications and logic, I'd love to read them.
Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html