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