mirror of
https://github.com/beetbox/beets.git
synced 2025-12-16 21:54:07 +01:00
Fixes #2504
PIL Image.save() requires a string parameter [1] while under python3 we call it with bytes. This leads to wrong format detection (b'.png' isn't a key in supported formats list). [1] https://pillow.readthedocs.io/en/latest/reference/Image.html#PIL.Image.Image.save
This commit is contained in:
parent
3ddf3ef58a
commit
1bada74bef
1 changed files with 1 additions and 1 deletions
|
|
@ -72,7 +72,7 @@ def pil_resize(maxwidth, path_in, path_out=None):
|
|||
im = Image.open(util.syspath(path_in))
|
||||
size = maxwidth, maxwidth
|
||||
im.thumbnail(size, Image.ANTIALIAS)
|
||||
im.save(path_out)
|
||||
im.save(util.displayable_path(path_out))
|
||||
return path_out
|
||||
except IOError:
|
||||
log.error(u"PIL cannot create thumbnail for '{0}'",
|
||||
|
|
|
|||
Loading…
Reference in a new issue