| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2003.01.18 06:03 "TIFFReadRGBAImage() problem", by Steve DekorteHi all,
I'm using the following code to read a tiff and get RGBA data, but when
I display the result it appears to have the proper red values, but the
green and blue are all set to 255. Am I doing something wrong?
--------------------------------------------------------
void TIFFImage_load(TIFFImage *self)
{
TIFF *in = TIFFOpen(self->path, "r");
if (in == NULL)
{ TIFFImage_error_(self, "error opeing file"); return; }
TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &(self->width));
TIFFGetField(in, TIFFTAG_IMAGELENGTH, &(self->height));
ByteArray_setLength_(self->byteArray, self->width * self->height * 4);
if (!TIFFReadRGBAImage(in, self->width, self->height,
(uint32 *)(self->byteArray->bytes), 0))
{ TIFFImage_error_(self, "error converting to RGBA"); return; }
}
|
|||||||