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

2003.01.19 10:41 "Re: TIFFReadRGBAImage() problem", by Steve Dekorte

Thanks for the response.

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