Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb89b01 commit 6ff693aCopy full SHA for 6ff693a
1 file changed
lib/matplotlib/backends/backend_wx.py
@@ -1112,7 +1112,9 @@ def _icon(name):
1112
*name*, including the extension and relative to Matplotlib's "images"
1113
data directory.
1114
"""
1115
- image = np.array(PIL.Image.open(cbook._get_data_path("images", name)))
+ pilimg = PIL.Image.open(cbook._get_data_path("images", name))
1116
+ # ensure RGBA as wx BitMap expects RGBA format
1117
+ image = np.array(pilimg.convert("RGBA"))
1118
try:
1119
dark = wx.SystemSettings.GetAppearance().IsDark()
1120
except AttributeError: # wxpython < 4.1
0 commit comments