2003.11.03 19:14 "[Tiff] 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.
firstname.lastname@example.org is not functional any more. Please, address your questions to the email@example.com. You can subscribe to the list here:
Andrey V. Kiselev
Home phone: +7 812 5274898 ICQ# 26871517