<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hello, list.
<div><br>
</div>
<div>I have recently encountered two unusual Tiff files. According to gdalinfo, there are three bands with the color interpretations</div>
<div>Gray, Undefined and Undefined, but eventually I figured out that they are really Red, Green and Blue. Apparently, GDAL gets </div>
<div>the <span style="font-size: 10pt;">information from the Tiff tag PhotometricInterpretation, which is "min-is-black" for my files, according to tiffinfo.</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;">One of the files has 8 bits per band and I found no further problems with it.</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;">In the other file, each band contains signed 16-bit integers, but it seems that only the values in the range 0 to 253 are used,</span></div>
<div><span style="font-size: 10pt;">plus the special value -32768 that appears to represent NODATA, although there is not enough metadata to make gdalinfo</span></div>
<div><span style="font-size: 10pt;">understand that -32768 is NODATA.  </span><span style="font-size: 10pt;">By assuming that the min and max intensities are represented by 0 and 255 in the obvious </span></div>
<div><span style="font-size: 10pt;">way, I could display a sensible image.</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;">My questions are half-technical and half-legal:</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;">1.  If an RGB Tiff file doesn't have PhotometricInterpretation = RGB, can it really be claimed </span><span style="font-size: 10pt;">that the file adheres to the Tiff standard, or is it corrupt?</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;">When I open the files in QGIS or ArcMap, they assume RGB for the default visualization but I don't know why. One of the files looks great in</span></div>
<div><span style="font-size: 10pt;">ArcMap by default (but slightly too white, I believe), while it looks very much too white by default in QGIS, although the QGIS display can be</span></div>
<div><span style="font-size: 10pt;">fixed by color re-configuration. For the other file, it is QGIS that displays a sensible image by default, whereas ArcMap displays it with very</span></div>
<div><span style="font-size: 10pt;">exaggerated contrast (the default QGIS display is brownish-rusty like Mars while the default ArcMap display is brightly reddish-white like Jupiter).</span></div>
<div><span style="font-size: 10pt;">So the score is 1 - 1 for the ArcMap/QGIS contest... I think the very different default displays confirm that the files are troublesome or corrupt.</span></div>
<div><br>
</div>
<div>2.  If the min and max intensities are not the same as the min and max representable numbers for the integer type, then how are</div>
<div>they specified in Tiff? I read something about a TransferRange Tiff tag for this purpose but didn't pursue the details, as I suspect</div>
<div>that my 16-bit Tiff file lacks this information. So let me ask: if the file somehow does contain information about the min and max </div>
<div>intensities, <span style="font-size: 10pt;">how would that information appear in the output from gdalinfo or tiffinfo?</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;">Kind regards,</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;">Mikael Rittri</span></div>
<div><span style="font-size: 10pt;">Carmenta Geospatial Technologies</span></div>
<div><span style="font-size: 10pt;">http://www.carmenta.com </span></div>
<div> </div>
<div><br>
</div>
<div><br>
</div>
</div>
</body>
</html>