AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
February 2008

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2008.02.11 07:43 "TIFFReadRGBAImage rendering upside-down", by Mick O'Neill
2008.02.11 16:03 "Re: TIFFReadRGBAImage rendering upside-down", by Frank Warmerdam
2008.02.12 00:29 "Re: TIFFReadRGBAImage rendering upside-down", by Mick O'Neill
2008.02.12 01:27 "Re: TIFFReadRGBAImage rendering upside-down", by Mick O'Neill

2008.02.12 00:29 "Re: TIFFReadRGBAImage rendering upside-down", by Mick O'Neill

Yes, I looked at the orientation tags, and they seemed to all indicate
ORIENTATION_TOPLEFT ok. I have other TIFF files, generated by the same
Kofax software, in fact, that all come out OK. There must be something
else somewhere.

The only tags that I noticed that are a bit odd are the
TIFFTAG_YCBCRSUBSAMPLING in the OJPEG compressed images (Missing, and
the Jpegs indicate [2,1]), and the TIFFTAG_FILLORDER tags in the CITT
compressed images with a value of FILLORDER_LSB2MSB, which is unusual. 

I cannot get onto the CVS to get the latest version - wondering if you
may be able to send me a copy of the tif_getimage.c and perhaps
tif_read.c modules you used so I can compare, and perhaps find out
exactly what it is that is different?

I don't mind flipping the images - in fact, I am loading the generated
RGBA into ImageMagick for further processing - I just need to know when
to do it.


Cheers,

Mick O'Neill
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.

Mick,

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
problems.

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