Skip to content

Conversation

@radarhere
Copy link
Member

Suggested in #5944 (comment)

The JPEG format does not support saving an image with zero width or height. This PR raises a ValueError for the situation, rather than the SystemError that is currently raised.

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Optional suggestion: this could even be the very first check before the OSError, as it's arguably a more fundamental problem than changing the mode.

@radarhere
Copy link
Member Author

Ok, done.

@hugovk
Copy link
Member

hugovk commented Mar 28, 2022

Thanks!

@hugovk hugovk merged commit 4459dfa into python-pillow:main Mar 28, 2022
@radarhere radarhere deleted the jpeg_zero branch March 28, 2022 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants