[gdal-dev] Nearblack and the datatype of the output

Even Rouault even.rouault at spatialys.com
Fri Jan 12 08:05:14 PST 2024


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 at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240112/86b9ffa7/attachment.htm>


More information about the gdal-dev mailing list