Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 799ab40

Browse filesBrowse files
authored
Merge pull request #11847 from cgohlke/patch-1
MNT: Use ImageMagick's magick.exe if convert.exe is not installed
2 parents 863158b + cdae6c0 commit 799ab40
Copy full SHA for 799ab40

File tree

Expand file treeCollapse file tree

1 file changed

+8
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-1
lines changed

‎lib/matplotlib/animation.py

Copy file name to clipboardExpand all lines: lib/matplotlib/animation.py
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,10 +735,17 @@ def _init_from_registry(cls):
735735
0, winreg.KEY_QUERY_VALUE | flag)
736736
binpath = winreg.QueryValueEx(hkey, 'BinPath')[0]
737737
winreg.CloseKey(hkey)
738-
binpath += r'\convert.exe'
739738
break
740739
except Exception:
741740
binpath = ''
741+
if binpath:
742+
for exe in ('convert.exe', 'magick.exe'):
743+
path = os.path.join(binpath, exe)
744+
if os.path.exists(path):
745+
binpath = path
746+
break
747+
else:
748+
binpath = ''
742749
rcParams[cls.exec_key] = rcParamsDefault[cls.exec_key] = binpath
743750

744751
@classmethod

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.