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
May 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.05.15 19:00 "TIFFWriteScanline endian swapping issue", by R Seidl
2004.05.15 20:39 "Re: TIFFWriteScanline endian swapping issue", by Bob Friesenhahn
2004.05.15 21:09 "Re: TIFFWriteScanline endian swapping issue", by Joris Van Damme
2004.05.15 22:46 "Re: TIFFWriteScanline endian swapping issue", by R Seidl
2004.05.15 20:54 "Re: TIFFWriteScanline endian swapping issue", by Joris Van Damme
2004.05.16 07:03 "Re: TIFFWriteScanline endian swapping issue", by Andrey Kiselev

2004.05.15 20:39 "Re: TIFFWriteScanline endian swapping issue", by Bob Friesenhahn

On Sat, 15 May 2004, R Seidl wrote:
>
> uint32 row;
> for( row=0; row<src.Size().fY; row++) {
>          // fill buffer from our TImage data
>          if (!TIFFWriteScanline(tif, tdata_t(src.PixelPtr(row)), row))
>          TIFFError("WriteImage","failure in WriteScanline\n");
> }
>
> When I write my RGB or RGBA images this way, it looks like the bytes are
> written in such an order that other programs on my PC (like Photoshop,
> CompuPic) display the "wrong" (eg byte flipped) images.

From your sample code I can't tell how "TImage data" is actually
formatted.  Maybe it is some sort of little-endian byte stream, or
maybe it is some other format used by the non-tifflib software you are
using.

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

Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen