How to adjust the quality of a resized image in Python Imaging Library?

Use PIL’s resize method manually:

image = image.resize((x, y), Image.ANTIALIAS)  # LANCZOS as of Pillow 2.7

Followed by the save method

quality_val = 90
image.save(filename, 'JPEG', quality=quality_val)

Take a look at the source for models.py from Photologue to see how they do it.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)