There are two parts to JPEG quality. The first is the quality
setting which you have already set to the highest possible value.
JPEG also uses chroma subsampling, assuming that color hue changes are less important than lightness changes and some information can be safely thrown away. Unfortunately in demanding applications this isn't always true, and you can most easily notice this on red edges. PIL doesn't expose a documented setting to control this aspect.
Edit by Pascal Beyeler:
I just found an option which disables subsampling. You can set subsampling=0
when saving an image and the image looks way sharper! Thanks for your Help Mark!
im.save('/path/to/cover-2.jpg', format='JPEG', subsampling=0, quality=100)
Edit once more:
The subsampling
option is finally documented, but I don't know how long that's been the case. Looks like you have the option of either an integer argument or a string; I still recommend 0
as shown above.
https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html#jpeg
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…