| 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 |
Thread2008.03.29 14:58 "Re: TIFFReadRawStrip buffer data type", by Frank WarmerdamJames Sumners wrote: > If I supply TIFFReadRawStrip() with a buffer of type int, and read a > grayscale image, I assume that each position in the buffer would be a > value between 0 and 255, right? If so, then I'm a little confused > about the debug output of my program[1]. It seems to be reading a ten > digit integer for each position in the buffer. Am I doing something > wrong? > > [1] -- http://student.claytonstate.net/~jsumners/wavelet.zip (source code) James, I didn't inspect the TIFF files or dig too deeply in your code, but basically it is likely that the pixels are being read back as 8bits per pixel values, but you are reading them into a 32bit integer buffer. If there is only one sample per pixel, then you will end up with four pixels packed into each int. Try using an "unsigned char" buffer instead of int. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | President OSGeo, http://osgeo.org |
|||||||