X Tutup
Skip to content

Fixed imsave() saving incorrect color map #29203

Closed
gpxxlt wants to merge 6 commits intomatplotlib:mainfrom
gpxxlt:main
Closed

Fixed imsave() saving incorrect color map #29203
gpxxlt wants to merge 6 commits intomatplotlib:mainfrom
gpxxlt:main

Conversation

@gpxxlt
Copy link
Copy Markdown
Contributor

@gpxxlt gpxxlt commented Nov 28, 2024

PR summary

Goal

This pull request is made to address issue #29183. It closes #29183.

Implementation

This pull request added an if branch within the function imsave() in the path lib/matplotlib/image.py. It is added to handle the case addressed in issue #29183 where input arr is a vanilla python list.

Testing

One test case is added to lib/matplotlib/tests/test_image.py so there is a round trip from imread() to imsave(). Test input is designed to be a vanilla python list so that the newly added branch is covered in test suite.

PR checklist

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

[Bug]: I give an RGB image to imsave but I don't have the right color map!

8 participants

X Tutup