Skip to content

Conversation

@radarhere
Copy link
Member

Resolves #8321

There is a limit on the size of WebP images.

https://developers.google.com/speed/webp/faq

The maximum pixel dimensions of a WebP image is 16383 x 16383.

When that limit is hit, this PR changes the error message from
"encoding error 5"
to
"encoding error 5: Image size exceeds WebP limit"

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.

Worth mentioning what the limit is? Or leave it out in case it might change?

@radarhere
Copy link
Member Author

I've updated the message to "encoding error 5: Image size exceeds WebP limit of 16383", using WEBP_MAX_DIMENSION so that if WebP does change the value, the message will also update.

radarhere and others added 2 commits August 24, 2024 21:26
@radarhere radarhere merged commit dcd77b5 into python-pillow:main Aug 24, 2024
@radarhere radarhere deleted the webp branch August 24, 2024 13:12
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.

ValueError: encoding error 5 during WEBP encoding should be replaced with something more informative

2 participants