mirror of
https://github.com/beetbox/beets.git
synced 2026-01-02 14:03:12 +01:00
Merge pull request #3784 from jackwilsdon/fix-pil-image-quality
Fix PIL image quality
This commit is contained in:
commit
be0003aba3
2 changed files with 7 additions and 0 deletions
|
|
@ -77,6 +77,11 @@ def pil_resize(maxwidth, path_in, path_out=None, quality=0):
|
|||
im = Image.open(util.syspath(path_in))
|
||||
size = maxwidth, maxwidth
|
||||
im.thumbnail(size, Image.ANTIALIAS)
|
||||
|
||||
if quality == 0:
|
||||
# Use PIL's default quality.
|
||||
quality = -1
|
||||
|
||||
im.save(util.py3_path(path_out), quality=quality)
|
||||
return path_out
|
||||
except IOError:
|
||||
|
|
|
|||
|
|
@ -266,6 +266,8 @@ Fixes:
|
|||
the current track in the queue.
|
||||
Thanks to :user:`aereaux`.
|
||||
:bug:`3722`
|
||||
* Fix a bug causing PIL to generate poor quality JPEGs when resizing artwork.
|
||||
:bug:`3743`
|
||||
|
||||
For plugin developers:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue