Skip to content

Conversation

@radarhere
Copy link
Member

ImageMorph features these two lines three times.

if image.mode != "L":
raise Exception("Image must be binary, meaning it must use mode L")

Exception is very generic, and L is not the only black and white mode that we have - there is also '1'.

This PR suggests changing it instead to

raise ValueError("Image mode must be L")

@hugovk hugovk merged commit b09a921 into python-pillow:master Apr 23, 2021
@radarhere radarhere deleted the morph branch April 23, 2021 22:21
radarhere added a commit to radarhere/Pillow that referenced this pull request May 1, 2021
radarhere added a commit to radarhere/Pillow that referenced this pull request May 1, 2021
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.

2 participants