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.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