How to convert a 1 or 4 bit deep PNG into an 8-bit PNG image?

Viewed 77
image = Image.open(file)   # file is 1-bit jpg
image = image.convert('P') # image become 8-bit 
colors = [0, 0, 0, 128, 0, 0, 0, 128, 0, 128, 128, 0, 0, 0, 128]
image.putpalette(colors)   # why use this code image become 4-bit ?
image.save("1.png",format='PNG') # save image become 4-bit png ????? (-w-)?

i need a 8-bit color png ,can you help me?

0 Answers
Related