I have a lot of screenshots after selenium test runs, and I'd like to reduce size of screenshots to save disk space. I tried to use PIL library next ways:
- use image.thumbnail() method to resize image and as a result I've got few profit (like from 140kb to 120kb) and low quality of screenshot.
- use image.save() method with "optimize=True" parameter and 1-2kb profit as result
- also tried image.save() with low "quality" parameter and it seems to have no effect
And I tried compress image with some online service and I've got compress result from 140kb to 40kb and great quality of screenshot. So my question - is there any library or way in Python to compress as well as any online service does?