AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2004.05.28 20:21 "[Tiff] trouble Reading the tiles I wrote", by James Carroll
2004.05.28 22:02 "Re: [Tiff] trouble Reading the tiles I wrote", by Frank Warmerdam

2004.05.28 22:02 "Re: [Tiff] trouble Reading the tiles I wrote", by Frank Warmerdam

Hi, I'm working with large images, and just created a conversion program to create some tiled jpeg compressed tiffs. I can create the files, and the tiffs seem to be valid enough to be read by viewers like irfanview.

Now I'm reading the same files into my own viewer, and having some trouble with the color model. There doesn't seem to be a ReadTileRGBA and I'm having trouble converting to my internal RGBRGBRGB... image.

What should look like: http://neuroinformatica.com:8080/jims/smallGood.jpg What it does look like: http://neuroinformatica.com:8080/jims/smallBad.jpg

What's the best way to convert to RGBRGBRGB... (or BGRBGRBGR...) for all types of encodings of tiled tiffs?

Jim,

There is a TIFFReadRGBATile() function if you don't mind repacking from RGBA format to your preferred order. The alternative of doing your own (possible) color conversion may be somewhat challenging depending on the nature of your source image.

PS. it would be helpful to include a tiffinfo report of your source file if you want people to comment on things that might be challenging in reading it.

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    | Geospatial Programmer for Rent