2004.05.16 07:03 "Re: [Tiff] TIFFWriteScanline endian swapping issue", by Andrey Kiselev
I'm guessing that your data is, underneath the object encapsulation, a windows DIB with 24bit RGB. Windows DIBs store 24bit RGB as B-G-R. Tiff/LibTiff is rooted in unix and platform independent traditions, they do things in oposite oposite order (pun intended), and as such expect R-G-B instead. Thus, neither party is to blame or buggy, but your glue code in-between needs to swap the bytes.
I want just add that the sample code showing how to load TIFF image into the Windows Bitmap structure can be found in the contrib/win_dib/ directory.
Andrey V. Kiselev
Home phone: +7 812 5274898 ICQ# 26871517