Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT: add is_batch kwarg to pillow #845

Merged
merged 3 commits into from
Jul 30, 2022

Conversation

FirefoxMetzger
Copy link
Contributor

This PR adds a new kwarg to PillowPlugin.write called is_batch. Currently, we try to figure out if the passed ndarray is an image or an image batch by looking at the shape or mode. This isn't always correct due to the aliasing of shapes, e.g., a (5, 5, 3) image could be a 5x5 RGB image or a batch of 5 5x3 grayscale images.

This PR hence adds is_batch as an optional kwarg to allow the user to explicitly pass this information if relevant.

@FirefoxMetzger
Copy link
Contributor Author

This should be RTR. I will keep the same procedure as last week until @almarklein comes back from vacation. I will leave the PR unmerged for anyone to review and if there are no open discussion points by Friday, I will merge :)

@FirefoxMetzger FirefoxMetzger merged commit 21d5c73 into imageio:master Jul 30, 2022
@FirefoxMetzger FirefoxMetzger deleted the pillow-is-batch branch July 30, 2022 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant