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

Raise appropriate exception during mask interpretation #359

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Gouvernathor
Copy link
Contributor

@Gouvernathor Gouvernathor commented Apr 14, 2022

fix #350

The current behavior passes errors silently when it comes to RGB images used as masks. Rather than using an arbitrary function to cast it back to one-scale pixels (=black and white pixels), I chose to make it raise an appropriate exception during mask parsing.
It does not properly solve the issue, but it makes the problem more visible, rather than the much more obscure RuntimeError showcased in the linked issue.

@Gouvernathor Gouvernathor changed the title Allow for full-RGB mask channels Raise appropriate exception during mask interpretation Apr 14, 2022
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.

RuntimeError
1 participant