I want to downsample a raster image using the max method that is available in GDAL in python.
In other words I would like to recreate the following bash command in python code:
gdalwarp -tr 32 32 -r max input_image.tif resampled_image.tif
I have found the following solution but for some reason this changes the values in the image to a range between approximately 0 and 2 when I load the created tif file.
How can I resample a raster image in python using the max method?