2008.02.11 07:43 "[Tiff] TIFFReadRGBAImage rendering upside-down", by Mick O'Neill

2008.02.12 01:27 "RE: [Tiff] TIFFReadRGBAImage rendering upside-down", by Mick O'Neill

Got it!

If I user TIFFReaadRGBAImageOriented instead, everything is OK.

Cheers all

Software Engineer

-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam@pobox.com]
Sent: Tuesday, 12 February 2008 2:03 AM
To: Mick O'Neill
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] TIFFReadRGBAImage rendering upside-down

Mick O'Neill wrote:
> Hi,
> I have some odd TIFF files here (that do have a subsampling error
> being reported for the OJPEG compressed images) that, when I call the
> TIFFReadRGBAImage function, renders the RGBA upside down (flipped, not

> rotated). I was wondering if there was something in the TIFF headers
> that tell me this is happening? Or perhaps some other info elsewhere.
> There are some applications around that read these TIFFs correctly,
> and others that will not read them at all.
> libtiff version 3.9.0 Beta
> Any ideas appreciated.


The tiffinfo reports:

    Orientation: row 0 top, col 0 lhs

Which is (I believe) the default case where the first pixel in the file
is the top left corner of the image. I also ran tiff2rgba with the
current development version of libtiff and tiff2rgba and it came out
with the first page "right side up", so I'm surprised you are having

Best regards,

I set the clouds in motion - turn up   | Frank Warmerdam,
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo,