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

ValueError: cannot add non-opaque RGBA color to RGB palette #6791

Closed
doublex opened this issue Dec 8, 2022 · 1 comment · Fixed by #6792
Closed

ValueError: cannot add non-opaque RGBA color to RGB palette #6791

doublex opened this issue Dec 8, 2022 · 1 comment · Fixed by #6792
Labels

Comments

@doublex
Copy link

doublex commented Dec 8, 2022

This image: dancing.zip

Testcase:

import PIL.Image
with PIL.Image.open('dancing.webp') as img:
    assert img.mode == 'RGB'
    frames = []
    for frame in PIL.ImageSequence.Iterator(img):
        frame = frame.resize( img.size, PIL.Image.BICUBIC )
        assert frame.mode == 'RGB'
        frames.append( frame )
    frames[0].save( 'result.gif', format='GIF', version='GIF89a', save_all=True, append_images=frames[1:], duration=30, loop=0 )
@radarhere
Copy link
Member

I've created PR #6792 to resolve this.

hugovk added a commit that referenced this issue Dec 21, 2022
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 a pull request may close this issue.

2 participants