AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2011.12.22 00:50 "[Tiff] Announcing Libtiff 4.0.0", by Bob Friesenhahn
2012.01.05 09:12 "Re: [Tiff] reading rgb values from 16 bits tif images", by Martin Alegre
2012.01.04 10:54 "[Tiff] reading rgb values from 16 bits tif images", by Martin Alegre
2012.01.04 12:37 "Re: [Tiff] reading rgb values from 16 bits tif images", by mikk
2012.01.04 14:07 "Re: [Tiff] reading rgb values from 16 bits tif images", by Olivier Paquet
2012.01.04 14:55 "Re: [Tiff] reading rgb values from 16 bits tif images", by Martin Alegre
2012.01.04 15:08 "Re: [Tiff] reading rgb values from 16 bits tif images", by Olivier Paquet
2012.01.04 14:42 "Re: [Tiff] reading rgb values from 16 bits tif images", by Bob Friesenhahn
2012.01.04 15:02 "Re: [Tiff] reading rgb values from 16 bits tif images", by Martin Alegre
2012.01.04 15:24 "Re: [Tiff] reading rgb values from 16 bits tif images", by Bob Friesenhahn

2012.01.04 12:37 "Re: [Tiff] reading rgb values from 16 bits tif images", by mikk

Hi,

When using TIFFReadRGBAImage - the raster pixels are 8-bit packed red, green, blue, alpha samples. It converts non-8-bit images by scaling sample values. Palette, grayscale, bilevel, CMYK and YCbCr images are converted to RGBtransparently. Raster pixels are returned uncorrected by any colorimetry information present in the directory.

So, you read a raster of pixels as 32-bit quads, 8-bits per component, and you use it correctly. The pixel values are of course in 0 - 2^8 range. If you want to get unscaled 16-bit values you have to use different function (not the RGBA interface). Try with TIFFReadEncodedStrip/Tile.

Regards,
Michal Zaganczyk