Hi,<br>I'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 "-scale" 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 "gdalinfo -stats" 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"><<a href="mailto:giannicristian@msn.com">giannicristian@msn.com</a>></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["WGS 84 / UTM zone 47S",<br>
GEOGCS["WGS 84",<br>
DATUM["WGS_1984",<br>
SPHEROID["WGS 84",6378137,298.257223563,<br>
AUTHORITY["EPSG","7030"]],<br>
AUTHORITY["EPSG","6326"]],<br>
PRIMEM["Greenwich",0],<br>
UNIT["degree",0.0174532925199433],<br>
AUTHORITY["EPSG","4326"]],<br>
PROJECTION["Transverse_Mercator"],<br>
PARAMETER["latitude_of_origin",0],<br>
PARAMETER["central_meridian",99],<br>
PARAMETER["scale_factor",0.9996],<br>
PARAMETER["false_easting",500000],<br>
PARAMETER["false_northing",10000000],<br>
UNIT["metre",1,<br>
AUTHORITY["EPSG","9001"]],<br>
AUTHORITY["EPSG","32747"]]<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' 2.82"E, 0d56'46.41"S)<br>
Lower Left ( 650301.875, 9893326.875) (100d21' 2.84"E, 0d57'53.40"S)<br>
Upper Right ( 652586.875, 9895384.375) (100d22'16.73"E, 0d56'46.38"S)<br>
Lower Right ( 652586.875, 9893326.875) (100d22'16.76"E, 0d57'53.37"S)<br>
Center ( 651444.375, 9894355.625) (100d21'39.79"E, 0d57'19.89"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>