gdal
gdal copied to clipboard
GTiff: handle TIFF color map that uses a 256 multiplication factor
and add open option:
.. oo:: COLOR_TABLE_MULTIPLIER :choices: AUTO, 1, 256, 257 :since: 3.10.0
Specifies the value by which to multiply GDAL color table entry values, usually in [0,255] range, to obtain a TIFF color map value, or on reading by which to divide TIFF color map values to get a GDAL color table entry. Since GDAL 2.3.0, GDAL consistently uses 257, but it might be necessary to use 256 for compatibility with files generated by other software. In AUTO mode, GDAL 3.10 or later can automatically detect the 256 multiplication factor when all values in the TIFF color map are multiple of that value.
and same as creation option.
Fixes #10310