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

Ignore non-opaque WebP background when saving as GIF #6792

Merged
merged 1 commit into from Dec 21, 2022

Conversation

radarhere
Copy link
Member

Resolves #6791

The user found a WebP image with info["background"] of (255, 255, 255, 0). When the user attempts to save this as a GIF, an error is thrown, because GifImagePlugin can't add this transparent color to the RGB palette of the GIF.

This PR solves this by simply ignoring transparent or translucent background colors when saving as GIF.

@hugovk hugovk merged commit aab4adc into python-pillow:main Dec 21, 2022
@radarhere radarhere deleted the webp_gif branch December 21, 2022 19:49
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: cannot add non-opaque RGBA color to RGB palette
2 participants