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.28 07:56 "Re: Possible problem with TIFFReadRGBAImage ?", by Jonathan Potter

Dear all,

I recently posted the following message to this list. I've since discovered (with thanks to Peter Montgomery for his comments), that my problem was that TIFFReadRGBAImage doesn't, in fact, return the image in ABGR format - it returns it in ARGB format. So I withdraw this bug suggestion, and humbly submit instead a request for the documentation on this interface to be clarified (the docs definitely say that it returns ABGR).

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/