Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6280da8

Browse files
committed
FIX: normalize image data in wring_png fast path
Closes #7373
1 parent 1c6b59a commit 6280da8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/image.py

Lines 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)