简体   繁体   中英

Python resizing animated gif with PIL

I follow the step at Resize GIF animation, pil/imagemagick, python to resize image using PIL and image2gif . However, I got the resized gif washed out like below:

在此输入图像描述

How do I solve this problem?

I have not tried this, but this suggests that the way to maintain transparency in GIF images with PIL when saving is:

im = Image.open(...)
transparency = im.info["transparency"]
...
out.save("out.gif", transparency=transparency)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM