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
January 2003

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

2003.01.18 06:03 "TIFFReadRGBAImage() problem", by Steve Dekorte
2003.01.19 09:39 "Re: TIFFReadRGBAImage() problem", by Steve Dekorte
2003.01.19 10:29 "Re: TIFFReadRGBAImage() problem", by Rainer Wiesenfarth
2003.01.19 10:41 "Re: TIFFReadRGBAImage() problem", by Steve Dekorte

2003.01.18 06:03 "TIFFReadRGBAImage() problem", by Steve Dekorte

Hi 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; }
}