Skip to content

Commit

Permalink
Fixes beetbox#2504
Browse files Browse the repository at this point in the history
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
  • Loading branch information
architek committed Sep 9, 2018
1 parent 3ddf3ef commit 1bada74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beets/util/artresizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}'",
Expand Down

0 comments on commit 1bada74

Please sign in to comment.