I'm using the GDAL command line tools gdal_warp
and gdal_translate
to convert RGB(A) GeoPDF images into GeoTIFF images. Unfortunately I found no config option that changes the RGB(A)
color space to Grayscale
.
I know it's possible to convert colors with gdal_calc.py
(How to convert 4band RGB/A GeoTiff to 1band Gray GeoTiif?), but I would prefer a single step conversion.
With GDAL VRT
we could use Python Pixel Functions
to change our raster pixels, but I couldn't find any specific example. Is there anyone in this forum who has experience here? ...@EvenRouault?
rgb2pct
tool.