Python Forum

Full Version: RGB to PALETTE conversion
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?

Thanks