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

Skip to content

Commit 338971b

Browse 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

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)