I use python to save jpegs in a smaller quality
im = Image.open(file)
im.save(cached_file, quality=80, optimize=True, progressive=True)
In some images however, the file size of the new image is larger than the original's. How can this happen?
PIL is a free library that adds image processing capabilities to your Python interpreter, supporting a range of image file formats such as PPM, PNG, JPEG, GIF, TIFF and BMP.
By default, the image data will be saved in PNG format. With a bitmap format of “bmp”, image data will be saved in BMP format instead. New in version 8.3. 0.
Is it possible that the original image was saved with quality < 80? So, you are basically using more space to save artifacts of the reconstruction?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With