I have a set of GeoTIFF having photometric = palette, I need to convert it to a greyscale image without losing associated data values.
I need to do using Python or ArcGIS.
Changing the color could be done by setting the tiff tag to 1 (Luminance mode) using Python module PIL (Pillow):
from PIL import Image
im = Image.open("test_in.tif")
im.tag[262] = 1
im.save("test_out.tif")
The problem is that the generated file does not have any spatial ref., what should I do ?
Sample : image sample

gdal– geoinfo May 29 '17 at 12:47