mirror of
https://github.com/beetbox/beets.git
synced 2025-12-30 12:32:33 +01:00
Update artresizer's ImageMagick commands to use the magick binary
Updated artresizer's ImageMagick commands to use the magick binary
added in ImageMagick 7.x, rather than the legacy utilities ('convert',
'identify', etc.) This resolves an issue where beets is failing to
detect or use ImageMagick on Windows even when it is set correctly
on the PATH, which in turn restores functionality to the fetchart and
embedart plugins on Windows.
Closes #2093
This commit is contained in:
parent
4d55e6dfbb
commit
ad9f256058
1 changed files with 3 additions and 3 deletions
|
|
@ -93,7 +93,7 @@ def im_resize(maxwidth, path_in, path_out=None):
|
|||
# with regards to the height.
|
||||
try:
|
||||
util.command_output([
|
||||
'convert', util.syspath(path_in, prefix=False),
|
||||
'magick', util.syspath(path_in, prefix=False),
|
||||
'-resize', '{0}x>'.format(maxwidth),
|
||||
util.syspath(path_out, prefix=False),
|
||||
])
|
||||
|
|
@ -121,7 +121,7 @@ def pil_getsize(path_in):
|
|||
|
||||
|
||||
def im_getsize(path_in):
|
||||
cmd = ['identify', '-format', '%w %h',
|
||||
cmd = ['magick', 'identify', '-format', '%w %h',
|
||||
util.syspath(path_in, prefix=False)]
|
||||
try:
|
||||
out = util.command_output(cmd)
|
||||
|
|
@ -235,7 +235,7 @@ def get_im_version():
|
|||
Try invoking ImageMagick's "convert".
|
||||
"""
|
||||
try:
|
||||
out = util.command_output(['convert', '--version'])
|
||||
out = util.command_output(['magick', '-version'])
|
||||
|
||||
if b'imagemagick' in out.lower():
|
||||
pattern = br".+ (\d+)\.(\d+)\.(\d+).*"
|
||||
|
|
|
|||
Loading…
Reference in a new issue