Make code for ImageMagick/GraphicsMagick more symmetric

This commit is contained in:
Latosha Maltba 2021-03-22 18:17:40 +00:00
parent 35943372f0
commit 52794432f0

View File

@ -259,11 +259,12 @@ def netpbm_available():
def magick_command():
if sys.platform == "win32":
imagemagick = os.environ.get("MAGICK_HOME", "")
if imagemagick:
imagemagick = [os.path.join(imagemagick, "convert.exe")]
graphicsmagick = [os.path.join(imagemagick, "gm.exe"), "convert"]
magickhome = os.environ.get("MAGICK_HOME", "")
if magickhome:
imagemagick = [os.path.join(magickhome, "convert.exe")]
graphicsmagick = [os.path.join(magickhome, "gm.exe"), "convert"]
else:
imagemagick = None
graphicsmagick = None
else:
imagemagick = ["convert"]