Search code examples
pythonjpegpython-imaging-library

Python PIL jpeg quality


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?


Solution

  • 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?