Hi guys. Have a nice day. I’m curious how gdal scales the values when converting from a larger range to a smaller range,like from u32 to u8, u16 to u8, f32 to u8 etc.. I made a test: gdal_translate -ot Byte -of GTiff gray_u32.tif gray_u8.tif All the u32 value in every sample of my gray_u32.tif is 10050 And All the value in result file is 255. This seems to be a boundary case where the maximum and minimum values are both 10050 but I’m curious the behavior here and I didn’t find a doc about this.
I hope this question is not too suptid or weired. Best, Lucas
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev