AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2004.02.06 21:35 "[Tiff] displaying 12 bit tiff image", by Liliana RESENDIZ
2004.02.09 09:00 "Re: [Tiff] displaying 12 bit tiff image", by Andrey Kiselev
2004.02.09 15:06 "Re: [Tiff] displaying 12 bit tiff image", by Bob Friesenhahn
2004.02.10 13:32 "Re: [Tiff] displaying 12 bit tiff image", by Liliana RESENDIZ
2004.02.10 21:41 "Re: [Tiff] displaying 12 bit tiff image", by Chris Cox
2004.02.10 22:30 "Re: [Tiff] displaying 12 bit tiff image", by Liliana RESENDIZ
2004.02.10 23:05 "Re: [Tiff] displaying 12 bit tiff image", by Bob Friesenhahn
2004.02.10 23:37 "Re: [Tiff] displaying 12 bit tiff image", by Frank Warmerdam
2004.02.11 00:21 "Re: [Tiff] displaying 12 bit tiff image", by Bob Friesenhahn

2004.02.09 09:00 "Re: [Tiff] displaying 12 bit tiff image", by Andrey Kiselev

On Fri, Feb 06, 2004 at 03:35:36PM -0600, Liliana RESENDIZ wrote:

I'm BCB6 user, I've reading the documentation in order to display correctly a 12-bit image

What is 12-bit image? Is it just 16-bit TIFF where the actual dynamic range of the values limited by 12 bit?

TIFF* tif = TIFFOpen(FileName, "rl");

You don't need "l" flag unless your intention is to _write_ the little-endian TIFF file.

with the TIFFReadRGBAImageOriented(tif, w, h, raster)) function, and i tried to display it on a TImage but it handles data range [0,256], but doing pixel_val = (uint16) *raster++,

Completely wrong. The image data in the 'raster' array represented as 8-bit packed ABGR pixels. TIFFReadRGBAImage() already did all type transformation work for you and if you need individual pixels you should use macros TIFFGetR/G/B/A. I think that your TImage component wants ABGR array on input, so you should just use 'raster' array as it comes from TIFFReadRGBAImage() with TImage.

Best regards,
Andrey

--
Andrey V. Kiselev

Home phone: +7 812 5274898 ICQ# 26871517