Forums

RGB to PALETTE conversion

Hello,

I'm trying to convert RGB image to PALETTE image with PIL:

img = Image.open(tiffile) img = img1convert("P", palette=Image.ADAPTIVE, colors=256) img.save(newtiffile+"_index.tif")
img.close()

...but, for example, the white color is 245, not 255 :(

And from CMYK to PALETTE? Is it possible? gdal option, please...

Thanks

That sounds like a question that would be better addressed by the PIL authors or the gdal authors. We can help with PythonAnywhere questions and with some general Python questions, but we're not experts on every library out there.