In [1]:
from PIL import Image

In [2]:
img = Image.open('data/src/lena.jpg')

In [3]:
img.save('data/src/lena_q95.jpg', quality=95)
img.save('data/src/lena_q50.jpg', quality=50)