AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
December 2004

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2004.12.02 18:07 "Having problems adding IPTC to a TIFF", by Roland Rabien
2004.12.02 18:30 "Re: Having problems adding IPTC to a TIFF", by Andrey Kiselev
2004.12.02 21:40 "Re: Having problems adding IPTC to a TIFF", by Roland Rabien
2004.12.06 22:52 "Re: Having problems adding IPTC to a TIFF", by Joris Van Damme
2004.12.07 02:08 "Re: Having problems adding IPTC to a TIFF", by Bob Friesenhahn
2004.12.07 02:53 "Re: Having problems adding IPTC to a TIFF", by Joris Van Damme
2004.12.07 04:13 "Re: Having problems adding IPTC to a TIFF", by Bob Friesenhahn
2004.12.07 04:27 "Re: Having problems adding IPTC to a TIFF", by Chris Cox
2004.12.07 09:11 "Re: Having problems adding IPTC to a TIFF", by Joris Van Damme
2004.12.07 20:29 "Re: Having problems adding IPTC to a TIFF", by Chris Cox
2004.12.07 20:51 "Re: Having problems adding IPTC to a TIFF", by Joris Van Damme
2004.12.07 22:14 "Re: Having problems adding IPTC to a TIFF", by Chris Cox
2004.12.07 09:12 "Re: Having problems adding IPTC to a TIFF", by Joris Van Damme
2004.12.07 10:34 "Re: Having problems adding IPTC to a TIFF", by Eric Vergnaud
2004.12.07 11:06 "Re: Having problems adding IPTC to a TIFF", by Joris Van Damme
2004.12.07 17:06 "Re: Having problems adding IPTC to a TIFF", by Eric Vergnaud
2004.12.07 17:16 "Re: Having problems adding IPTC to a TIFF", by Bob Friesenhahn
2004.12.07 20:45 "Re: Having problems adding IPTC to a TIFF", by Joris Van Damme
2004.12.07 22:16 "Re: Having problems adding IPTC to a TIFF", by Chris Cox
2004.12.07 22:26 "Re: Having problems adding IPTC to a TIFF", by Eric Vergnaud
2004.12.07 21:06 "Re: Having problems adding IPTC to a TIFF", by Gary Mcgath

2004.12.07 02:53 "Re: 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