Hi,<br>I&#39;m not sure about which type of logic is applied by ENVI when saving to ENVI 8-bit.<br>You could try with:<br>gdal_translate -of ENVI -ot Byte -scale gtiffimg.tif fromgdal.raw<br><br>and see the result. the &quot;-scale&quot; option will rescale the pixel values from the UINT16 range 1 - 24806  to Byte 0 - 255.<br>
In case it is still different, you could also try a &quot;gdalinfo -stats&quot; on fromENVI and you could probably work on the -scale option to get the same result.<br><br>Let us know.<br>Regards,<br>Daniele<br><br><br><br>
<div class="gmail_quote">On Thu, Jun 30, 2011 at 4:11 PM, Solimyr <span dir="ltr">&lt;<a href="mailto:giannicristian@msn.com">giannicristian@msn.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Driver: GTiff/GeoTIFF<br>
Files: File.tif<br>
       File.tfw<br>
Size is 1828, 1646<br>
Coordinate System is:<br>
PROJCS[&quot;WGS 84 / UTM zone 47S&quot;,<br>
    GEOGCS[&quot;WGS 84&quot;,<br>
        DATUM[&quot;WGS_1984&quot;,<br>
            SPHEROID[&quot;WGS 84&quot;,6378137,298.257223563,<br>
                AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]],<br>
            AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],<br>
        PRIMEM[&quot;Greenwich&quot;,0],<br>
        UNIT[&quot;degree&quot;,0.0174532925199433],<br>
        AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]],<br>
    PROJECTION[&quot;Transverse_Mercator&quot;],<br>
    PARAMETER[&quot;latitude_of_origin&quot;,0],<br>
    PARAMETER[&quot;central_meridian&quot;,99],<br>
    PARAMETER[&quot;scale_factor&quot;,0.9996],<br>
    PARAMETER[&quot;false_easting&quot;,500000],<br>
    PARAMETER[&quot;false_northing&quot;,10000000],<br>
    UNIT[&quot;metre&quot;,1,<br>
        AUTHORITY[&quot;EPSG&quot;,&quot;9001&quot;]],<br>
    AUTHORITY[&quot;EPSG&quot;,&quot;32747&quot;]]<br>
Origin = (650301.875000000000000,9895384.375000000000000)<br>
Pixel Size = (1.250000000000000,-1.250000000000000)<br>
Metadata:<br>
  TIFFTAG_XRESOLUTION=1<br>
  TIFFTAG_YRESOLUTION=1<br>
  AREA_OR_POINT=Area<br>
Image Structure Metadata:<br>
  INTERLEAVE=BAND<br>
Corner Coordinates:<br>
Upper Left  (  650301.875, 9895384.375) (100d21&#39; 2.82&quot;E,  0d56&#39;46.41&quot;S)<br>
Lower Left  (  650301.875, 9893326.875) (100d21&#39; 2.84&quot;E,  0d57&#39;53.40&quot;S)<br>
Upper Right (  652586.875, 9895384.375) (100d22&#39;16.73&quot;E,  0d56&#39;46.38&quot;S)<br>
Lower Right (  652586.875, 9893326.875) (100d22&#39;16.76&quot;E,  0d57&#39;53.37&quot;S)<br>
Center      (  651444.375, 9894355.625) (100d21&#39;39.79&quot;E,  0d57&#39;19.89&quot;S)<br>
Band 1 Block=1828x1 Type=UInt16, ColorInterp=Gray<br>
  Minimum=1.000, Maximum=24806.000, Mean=230.385, StdDev=290.366<br>
  Metadata:<br>
    STATISTICS_MINIMUM=1<br>
    STATISTICS_MAXIMUM=24806<br>
    STATISTICS_MEAN=230.38520376963<br>
    STATISTICS_STDDEV=290.36594272901<br>
<font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/GDAL-TRANSLATE-Gray-scale-tp6533237p6533400.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/GDAL-TRANSLATE-Gray-scale-tp6533237p6533400.html</a><br>

</font><div><div></div><div class="h5">Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-------------------------------------------------------<br>Ing. Daniele Romagnoli <br>
GeoSolutions S.A.S.<br>
Software Engineer<br>
<br>
Via Poggio alle Viti 1187<br>
55054  Massarosa (LU)<br>
Italy<br>
<br>
phone: +39 0584 962313<br>
fax:      +39 0584 962313<br><br><a href="http://www.geo-solutions.it/" target="_blank">http://www.geo-solutions.it</a><br>
<a href="http://geo-solutions.blogspot.com/" target="_blank">http://geo-solutions.blogspot.com/</a><br>
<a href="http://www.youtube.com/user/GeoSolutionsIT" target="_blank">http://www.youtube.com/user/GeoSolutionsIT</a><br><a href="http://it.linkedin.com/in/danieleromagnoli" target="_blank">http://it.linkedin.com/in/danieleromagnoli</a><br>
<br><br>-------------------------------------------------------<br><br>