AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2001.05.23 11:24 "Possible problem with TIFFReadRGBAImage ?", by Jonathan Potter
2001.05.28 07:56 "Re: Possible problem with TIFFReadRGBAImage ?", by Jonathan Potter

2001.05.23 11:24 "Possible problem with TIFFReadRGBAImage ?", by Jonathan Potter

Hi all,

 I'm wondering if I have stumbled onto a problem with the TIFFReadRGBAImage
 function?

 Please see the tiff image at ftp://ftp.lss.com.au/misc/image06.tif

 Using my program, which uses the TIFFReadRGBAImage interface under Windows,
 the red and blue colours in the image are reversed. As you know, Windows
 uses an ABGR format in 32 bit mode, which is what the TIFFReadRGBAImage
 returns most of the time. However, on this particular image it is returning
 an ARGB format image.

 I have traced the problem to the putRGBcontig8bittile function in
 tif_getimage.c. If I modify the UNROLL8 macro line and swap the order of
 pp[0] and pp[2], this image then displays perfectly.

 Not knowing anything about tifflib, or the tiff format in general, I
 thought I should post to this list and ask if anyone has come across this
 before I make this a permanent change to my program.

 Many thanks,
 Jonathan Potter

           -- Jonathan Potter -- Left Side Software -- +61-414-721752 --
                               http://www.lss.com.au/