| 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 |
Thread2004.05.15 20:39 "Re: TIFFWriteScanline endian swapping issue", by Bob FriesenhahnOn 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
|
|||||||