Skip to content

Commit 338971b

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)