i have a 1.png and it is 24 bit depth.i want to convert it to 8 bit depth with python with pillow.
I tried this code but when i have checked both of these images(1.png and 2.png) were still 24 bit depth:
from PIL import Image
import os
os.chdir('D:\\test')
img=Image.open('1.png')
img.convert("P", palette=Image.ADAPTIVE, colors=8)
img.save('D:\\test\\2.png')
How can i convert my 1.png to an 8 bit depth and save it in pillow?
