id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 2213,GTiff : inconsistant [0-255] <--> [0-65535] colormap values translation,Even Rouault,warmerdam,"The conversion between the GDAL 8 bit color map space, ranging from 0 to 255, to the TIFF 16 bit color map space, ranging from 0 to 65535, is not done currently in a very consistent way in the code. Most places multiply or divide by 256, and one place multiplies by 257 (GTiffCreateCopy for a GDT_Byte band). I think that the right factor is 257, in order to use the full dynamics of the 0-65535 range. I would propose too to use the following formula, (tiff_color_value + 127) / 257, that rounds to the nearest value. However, there's maybe a good reason to do as it's actually done ? I could imagine it's done because some other software use 256 as the multiplication/division factor and we want to be consistent with them ? But if it is the case, then we should replace the 257 factor by 256.",defect,closed,normal,2.2.4,default,unspecified,normal,fixed,gtiff colormap,