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 6b53724

Browse filesBrowse files
daniilStimhoffm
andauthored
Fix older versions of Pillow
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
1 parent d79cdeb commit 6b53724
Copy full SHA for 6b53724

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎lib/matplotlib/backends/_backend_tk.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/_backend_tk.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ def _set_image_for_button(self, button):
665665
# the dark background.
666666
foreground = (255 / 65535) * np.array(
667667
button.winfo_rgb(button.cget("foreground")))
668-
image_data = np.asarray(im)
668+
image_data = np.asarray(im).copy()
669669
black_mask = (image_data[..., :3] == 0).all(axis=-1)
670670
image_data[black_mask, :3] = foreground
671671
im = Image.fromarray(image_data, mode="RGBA")

0 commit comments

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