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
June 2004

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

2004.06.02 09:35 "Load a 8 bits tiff file in a 24 bits ximage", by <sgrosjean94@yahoo.fr>
2004.06.02 14:05 "Re: Load a 8 bits tiff file in a 24 bits ximage", by Frank Warmerdam

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

Stephane Grosjean wrote:
> Hello,
> 
>  
> 
> 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