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
August 2007

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

2007.08.20 01:34 "can libtiff deal with this file? [re-sent]", by Abraham D Smith
2007.08.20 02:13 "Re: can libtiff deal with this file? [re-sent]", by Frank Warmerdam
2007.08.20 02:26 "Re: can libtiff deal with this file? [re-sent]", by Bob Friesenhahn
2007.08.20 18:25 "Re: can libtiff deal with this file? [re-sent]", by Craig Bruce
2007.08.20 19:10 "Re: can libtiff deal with this file? [re-sent]", by Bob Friesenhahn

2007.08.20 18:25 "Re: can libtiff deal with this file? [re-sent]", by Craig Bruce

"Abraham D. Smith" <abe+tiff@tock.no-ip.org> wrote:

> I have hundreds of gigabytes of microscope images which libTiff cannot
> seem to handle properly.  Indeed, the only program on Linux which can
> seem to handle these files is the NIH's ImageJ.  Every libtiff-based
> image viewer seems to truncate the brightness.  

The problem isn't with LibTiff per se.  The problem is that the TIFF
images really aren't encoded properly.  The TIFF tags indicate that they
are 16-bit grayscale, whereas they are actually 14-bit grayscale images.
As such, the ImageMagick display is correct and ImageJ is showing a
(perhaps unauthorized) constrast stretching.

The correct way to encode these images would be to scale the samples up
to 16 bits or to encode the image using 14 physical bits.  The latter
approach, however, probably isn't compatible with any existing software.

Other approaches would be to use MinSampleValue/MaxSampleValue or
SMinSampleValue/SMaxSampleValue tags.  The former isn't supposed to
be used in this way, but we have customers who do this, so I check if
the max value is one less than a power of 2 and if so, I use it as the
physical range limit.  The description of SMaxSampleValue in the 6.0
spec doesn't disallow this usage (though it's probably inteded to have
the same semantics as MaxSampleValue).

--------------------------+----------------------+--------------------------
Dr. Craig S. Bruce        | Ph 819-771-8303 x205 |             CubeWerx Inc.
Senior Software Developer |   Fax 819-771-8388   |  Gatineau, Québec, Canada
csbruce@cubewerx.com      |  http://csbruce.com/ |  http://www.cubewerx.com/
--------------------------+----------------------+--------------------------
       "Did you ever notice that 'love' spelled backwards is 'evil'?
              Well, not exactly, but it's still pretty scary."