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

The image compress issue #2480

Closed
ReZeroS opened this issue Apr 7, 2017 · 1 comment
Closed

The image compress issue #2480

ReZeroS opened this issue Apr 7, 2017 · 1 comment
Labels

Comments

@ReZeroS
Copy link

ReZeroS commented Apr 7, 2017

What did you do?

Reverse a gif get it much bigger size on disk

What did you expect to happen?

Still the original size or only a bit more

What versions of Pillow and Python are you using?

latest Pillow and 3.6 Python

from PIL import Image, ImageSequence
from PIL import ImagePalette
with Image.open('sd.gif') as im:
    if im.is_animated:
        frames = [f.copy() for f in ImageSequence.Iterator(im)]
        frames.reverse()
        frames[0].save('out.gif', save_all=True, append_images = frames[1:])  
@hugovk
Copy link
Member

hugovk commented Apr 7, 2017

Duplicate of #617.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants