Jukka,

nearblack is quite a special case. The doc says "The processing is all done in 8bit (Bytes)." , so it only properly works on Byte datasets.. If you provide any other data type, the values will be clamped to [0,255]. And when creating an output file, it will always be Byte.

The data type is not technically a "creation option" (in the sense of the -co option). It is an argument of the GDALDriver::Create() function (which takes creation options as well)

Even

Le 12/01/2024 à 14:39, Rahkonen Jukka via gdal-dev a écrit :

Hi,

Do I understand right that the raster drivers like the GTiff driver do not have a creation option for the datatype? Most utilities like gdal_translate, gdalwarp, and gdal_create have the -ot option, but there are couple of utilities that don’t even it might make sense. For example nearblack can only create float32 output from float32 input and user cannot do anything for that.

-Jukka Rahkonen-


_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

--
http://www.spatialys.com
My software is free, but my time generally not.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to