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
October 2004

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

2004.10.13 16:00 "Any way to pass a byte based buffer in calling TIFFReadRGBAImageOriented?", by Howard Xu
2004.10.17 06:35 "Re: Any way to pass a byte based buffer in calling TIFFReadRGBAImageOriented?", by Andrey Kiselev

2004.10.17 06:35 "Re: Any way to pass a byte based buffer in calling TIFFReadRGBAImageOriented?", by Andrey Kiselev

On Wed, Oct 13, 2004 at 11:00:36AM -0500, Howard Xu wrote:
> I am trying to use the latest libtiff library. But I have found that
> APIs in reading TIFF files are requiring only a unit32 buffer
> (tifBuffer) in the following call:
> 
>      TIFFReadRGBAImageOriented(tifFile,
>                                                           width, height,
>                                                           tifBuffer,
>                                                           
> ORIENTATION_TOPLEFT, 0)
> 
> If I knew that the TIFF file to be loaded is a Black/White 1
> sample/bit data file, is there any way I can pass a byte (unsigned
> char) buffer to the API so that the memory usage will be more
> efficient?

TIFFRGBAImage is a high level API. These calls always operate in the
RGBA space and your 1-bit image will be converted in 8-bit quadruplet.
To get access to the actual data contained in your image you should use
TIFFReadScanline/TIFFReadEncodedStrip/TIFFReadTile functions.

						Andrey

-- 
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517