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
November 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.11.03 05:43 "Using libtiff for 16-bit tiff", by Unknown
2003.11.03 19:14 "Re: Using libtiff for 16-bit tiff", by Andrey Kiselev

2003.11.03 19:14 "Re: Using libtiff for 16-bit tiff", by Andrey Kiselev

On Mon, Nov 03, 2003 at 06:43:13PM +0100, A dog wrote:
> I am trying to use libtiff to open 16-bit tiff images but it appears
> black. Is it possible ? I am currently using the function
> TIFFReadRGBAImage(tif, w, h, raster, 0) but it returns -1. Do I have
> to call another function ?

Yes, you need other approach. TIFFReadRGBAImage() was introduced to work
well with 8-bit images only. It can handle 16-bit ones, but in very dumb
way: by rejecting the least significant part of the word. It is equal to
division by 256. It works well for wide dynamic ranges only.

You should use low-level functions such as TIFFReadScanline(),
TIFFReadEncodedStrip() and TIFFReadTile().

> And my last question, do you have an example in Visual c++ ?

Look at the tools directory, there are many examples there.

					Best regards,
					Andrey

PS.
tiff@olimpiacos.org is not functional any more. Please, address your
questions to the tiff@remotesensing.org. You can subscribe to the list
here:

 http://remotesensing.org/mailman/listinfo/tiff/

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