AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

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.19 10:41 "Re: TIFFReadRGBAImage() problem", by Steve Dekorte

Thanks for the response.

On Sunday, January 19, 2003, at 02:29 AM, Rainer Wiesenfarth wrote:

Just a guess: your byte array seems to be of type char*.

It's an unsigned char *, yes.

Is it possible that you forget to cast byteArray to uint32 before accessing?

I'm just handing it to OpenGL as an RGBA8 buffer.

   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
   glPixelStorei(GL_UNPACK_ROW_LENGTH, self->width);
   glDrawPixels(self->width, self->height, GL_RGBA, GL_UNSIGNED_BYTE,
     (const GLvoid*)self->byteArray->bytes);

The buffer set by TIFFReadRGBAImage() is in RGBA format with one byte per component, isn't it?

Cheers,
Steve
OSX freeware and shareware: http://www.dekorte.com/downloads.html