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
February 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.02.06 21:35 "displaying 12 bit tiff image", by Liliana Resendiz
2004.02.09 09:00 "Re: displaying 12 bit tiff image", by Andrey Kiselev
2004.02.09 15:06 "Re: displaying 12 bit tiff image", by Bob Friesenhahn
2004.02.10 13:32 "Re: displaying 12 bit tiff image", by Liliana Resendiz
2004.02.10 21:41 "Re: displaying 12 bit tiff image", by Chris Cox
2004.02.10 22:30 "Re: displaying 12 bit tiff image", by Liliana Resendiz
2004.02.10 23:05 "Re: displaying 12 bit tiff image", by Bob Friesenhahn
2004.02.10 23:37 "Re: displaying 12 bit tiff image", by Frank Warmerdam
2004.02.11 00:21 "Re: displaying 12 bit tiff image", by Bob Friesenhahn

2004.02.09 09:00 "Re: 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