From ad9f256058fefed9df9b476a7314fd14929ed7d2 Mon Sep 17 00:00:00 2001 From: ababyduck Date: Mon, 22 Apr 2019 23:12:51 -0700 Subject: [PATCH] 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 --- beets/util/artresizer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/beets/util/artresizer.py b/beets/util/artresizer.py index e58b356be..31554ceb9 100644 --- a/beets/util/artresizer.py +++ b/beets/util/artresizer.py @@ -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+).*"