Do some image compression tests~

This commit is contained in:
Kenwood 2021-07-15 10:35:33 -04:00
parent 598e84603f
commit 5062ada35a
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
from PIL import Image
im = Image.open('still.jpg')
# using Image.ADAPTIVE to avoid dithering
for i in range(8, 0, -1):
out = im.convert('P', palette=Image.ADAPTIVE, colors=i)
out.save(f'out_{i}_bits.png')