Quantizing JPEG files using Pillow increases file size

129 views Asked by At

I'm trying to use the Pillow library to quantize JPEGs to decrease file size but I find that quantizing and converting back to RGB results in a larger file size.

I am saving the JPEG with the default quality of 75. I have also tried converting the source file to PNG, using pngquant, and converting back. I know that Tinypng works on JPEG files so I'm wondering if I'm missing anything.

test = Image.open(filepath)
test = test.quantize()
test = test.convert('RGB')
test.save('test.jpeg', optimize = True, quality = 75)

Image File

0

There are 0 answers