comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Reading 12-bit TIFF Images
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Reading 12-bit TIFF Images [message #19831] Thu, 20 April 2000 00:00
Struan Gray is currently offline  Struan Gray
Messages: 178
Registered: December 1995
Senior Member
David Fanning, davidf@dfanning.com writes:

> Does anyone have any advice/experience reading and working
> with 12-bit TIFF images in IDL?

Not in IDL, but I played with 12-bit TIFFs a long time ago.


> I poked around the web a bit, but I wasn't successful in
> learning whether 12-bit images are just stored as two
> 8-bit bytes, or whether the packing is true 12-bit.
> Anyway, any light you can shed will be welcome. Thanks.

The official word is here, including a PDF file with the
spec for TIFF 6.0.:

http://www.adobe.com/support/salesdocs/2596.htm

As far as I know there is no standard for how 12-bit data should
be stored, and in general you need to ask whoever wrote the file in
order to decode it. The TIFF standard integer data types are 8, 16
and 32 bit unsigned integers, although there are tags that mark the
data as being twos-complement signed integers.

All the examples I came across did the obvious thing and stored
the samples as 16-bit values with four empty bits (but which ones?),
relying on TIFF's compression of the whole array to get rid of
redundancy if filespace was low. Adobe applications certainly store
12-bit data from scanners as 16-bit integers. It's possible that
someone has packed the 12-bit values into an array of bytes and saved
it as a pseudo 8-bit image, but unlikely.


Struan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: 3D Reconstructions of 2D Slices
Next Topic: clear, who

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:19:21 PDT 2025

Total time taken to generate the page: 0.00972 seconds