2004.05.15 19:00 "[Tiff] TIFFWriteScanline endian swapping issue", by Robert Seidl

2004.05.15 21:09 "Re: [Tiff] TIFFWriteScanline endian swapping issue", by Joris Van Damme

Libtiff is used successfully by lots of software so any formatting errors are likely to be in the buffer that you pass to libtiff.

While you are of course correct, I can't help feeling this sounds like Sam speaking... ;-)

R Seidl wrote:
> Also tried using "l" and "b" (little and big endian) parameters to the open
> call
Bob wrote:
> Maybe it is some sort of little-endian byte stream

No, it's got nothing to do with endianness. From this line:

TIFFSetField(tif,TIFFTAG_BITSPERSAMPLE, (uint16)8);

it's clear that we're talking about bytes, not words or anything. Endianness is a multi-byte issue.

It is, instead, windows tradition B-G-R needing to be byteswapped to unix tradition R-G-B.

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