AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2004.03.02 21:17 "[Tiff] Reading caspian.tif", by Simon Granger
2004.03.03 16:40 "Re: [Tiff] Reading caspian.tif", by Andrey Kiselev
2004.03.03 19:52 "Re: [Tiff] Reading caspian.tif", by Bob Friesenhahn
2004.03.03 20:17 "Re: [Tiff] Reading caspian.tif", by Frank Warmerdam
2004.03.03 21:18 "Re: [Tiff] Reading caspian.tif", by Simon Granger
2004.03.03 19:59 "Re: [Tiff] Reading caspian.tif", by Chris Cox

2004.03.03 20:17 "Re: [Tiff] Reading caspian.tif", by Frank Warmerdam

But why did you expected the values will be in 0.0,1.0 range? If we have floating point data then the whole range can be occupied. For displaying purposes you should find min/max values yourself and scale image properly.

How does one scale the image "properly" without knowing what the image is supposed to look like? Mapping the min/max values of the data to min/max intensity values doesn't necessarily make sense.

Bob,

Certainly your point is correct. I can see that if floating point format were being used to store image colors with high precision then it would be necessary to include scaling information to define how it maps to RGB.

However, in scientific (and remote sensing) circles such as Andrey and I work in, TIFF is commonly used to distribute data that has no obvious mapping to display values. The pixel values have some other meaning that might relate to a particular kind of sensor, or a particular scientific result. How that is actually displayed might vary depending on the application using the data. So the data is distributed without any inherent scaling information.

As Andrey suggests, a fairly obvious way of dealing with the data is to check the min/max values and do a linear scaling between them, but some applications will do substantially more complex things to make the information viewable.

Imagine for instance that you wanted to distribute a raster file with temperature information in it. There is no inherent display semantics though different applications might use any of a variety of schemes.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent