I already tried this step: $ gdal_translate -of ENVI -ot Byte -scale File.tif Prova.raw Input file size is 1828, 1646 0...10...20...30...40...50...60...70...80...90...100 - done.
$ gdalinfo -stats prova.raw Driver: ENVI/ENVI .hdr Labelled Files: prova.raw prova.raw.aux.xml prova.hdr Size is 1828, 1646 Coordinate System is: PROJCS["UTM Zone 47, Southern Hemisphere", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AUTHORITY["EPSG","4326"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",99], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",10000000], UNIT["Meter",1]] Origin = (650301.875000000000000,9895384.375000000000000) Pixel Size = (1.250000000000000,-1.250000000000000) Metadata: Band_1=Band 1 TIFFTAG_XRESOLUTION=1 TIFFTAG_YRESOLUTION=1 AREA_OR_POINT=Area Image Structure Metadata: INTERLEAVE=BAND Corner Coordinates: Upper Left ( 650301.875, 9895384.375) (100d21' 2.82"E, 0d56'46.41"S) Lower Left ( 650301.875, 9893326.875) (100d21' 2.84"E, 0d57'53.40"S) Upper Right ( 652586.875, 9895384.375) (100d22'16.73"E, 0d56'46.38"S) Lower Right ( 652586.875, 9893326.875) (100d22'16.76"E, 0d57'53.37"S) Center ( 651444.375, 9894355.625) (100d21'39.79"E, 0d57'19.89"S) Band 1 Block=1828x1 Type=Byte, ColorInterp=Undefined Description = Band 1 Minimum=0.000, Maximum=255.000, Mean=2.364, StdDev=3.013 Metadata: STATISTICS_MINIMUM=0 STATISTICS_MAXIMUM=255 STATISTICS_MEAN=2.3638978918458 STATISTICS_STDDEV=3.0127939567847 And the results from ENVI is: $ gdalinfo -stats fromENVI.raw Driver: ENVI/ENVI .hdr Labelled Files: fromENVI.raw fromENVI.raw.hdr Size is 1828, 1646 Coordinate System is: PROJCS["UTM Zone 47, Southern Hemisphere", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AUTHORITY["EPSG","4326"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",99], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",10000000], UNIT["Meter",1]] Origin = (650301.875000000000000,9895384.375000000000000) Pixel Size = (1.250000000000000,-1.250000000000000) Metadata: Band_1=Gray Scale (Band 1:File.tif) Image Structure Metadata: INTERLEAVE=BAND Corner Coordinates: Upper Left ( 650301.875, 9895384.375) (100d21' 2.82"E, 0d56'46.41"S) Lower Left ( 650301.875, 9893326.875) (100d21' 2.84"E, 0d57'53.40"S) Upper Right ( 652586.875, 9895384.375) (100d22'16.73"E, 0d56'46.38"S) Lower Right ( 652586.875, 9893326.875) (100d22'16.76"E, 0d57'53.37"S) Center ( 651444.375, 9894355.625) (100d21'39.79"E, 0d57'19.89"S) Band 1 Block=1828x1 Type=Byte, ColorInterp=Undefined Description = Gray Scale (Band 1:File.tif) Minimum=0.000, Maximum=255.000, Mean=53.375, StdDev=48.454 Metadata: STATISTICS_MINIMUM=0 STATISTICS_MAXIMUM=255 STATISTICS_MEAN=53.374992023631 STATISTICS_STDDEV=48.454042778451 Looking at the histogram seems that ENVI do a conversion using a kind of equalize scale. Do you know where I can find the method that ENVI use? I have searched a lot without solution and seems that I'm the only one with this problem! Very strange! -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GDAL-TRANSLATE-Gray-scale-tp6533237p6533558.html Sent from the GDAL - Dev mailing list archive at Nabble.com. _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev