2004.06.02 09:35 "[Tiff] Load a 8 bits tiff file in a 24 bits ximage", by Stephane Grosjean

2004.06.02 14:05 "Re: [Tiff] Load a 8 bits tiff file in a 24 bits ximage", by Frank Warmerdam

I use LibTiff v3.6.1 and the XTiff modules. I try to load a tiff file in a ximage structure. The file is a 8 bits colored image and my ximage is 24 bits depth.

The xtiff modules don’t allow me to convert a 8 tiff file on a 24 bits display.

Is there any possibility to do this?

What is the easiest way to load a tiff in a ximage?

Stephane,

Likely the easist way is to use the TIFFReadRGBAImage() function and then if you really just want RGB repack the buffer down to RGB (discarding the alphas).

This will work for a variety of TIFF image types. Paletted, RGB, RGBA, greyscale.

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