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 338971b

Browse filesBrowse files
authored
Merge pull request #7374 from tacaswell/fix_imsave_normalize
FIX: normalize image data in write_png fast path
2 parents cb21ba7 + 6280da8 commit 338971b
Copy full SHA for 338971b

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+1
-1
lines changed

‎lib/matplotlib/image.py

Copy file name to clipboardExpand all lines: lib/matplotlib/image.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ def contains(self, mouseevent):
524524

525525
def write_png(self, fname):
526526
"""Write the image to png file with fname"""
527-
im = self.to_rgba(self._A, bytes=True, norm=False)
527+
im = self.to_rgba(self._A, bytes=True, norm=True)
528528
_png.write_png(im, fname)
529529

530530
def set_data(self, A):

0 commit comments

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