Hi, I'm expecting `gdal_translate -scale` to emit values in the range 0,255
but it seems to be targeting 0,256.  (All works as expected when using
explicit src_min src_max dst_min dst_max).

To see the output range on a simple example (see code at link below in case
email garbles):

from osgeo import gdal
ds = gdal.Translate("/vsimem/scl.tif", "autotest/gcore/data/float32.tif",
options = "-scale")
ds.GetRasterBand(1).ComputeRasterMinMax()
## (0.0, 255.99899291992188)

Is that expected, am I missing something? I've tried variations on the
input values and output types.

https://gist.github.com/mdsumner/ee4103d8616b9aa341e82c46b44a8c8c

Cheers, Mike


-- 
Michael Sumner
Research Software Engineer
Australian Antarctic Division
Hobart, Australia
e-mail: mdsum...@gmail.com
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to