Python resizes animated gif with PIL

I follow the step in Resize GIFs, pil / imagemagick, python to resize images using PILand image2gif. However, I got a resized gif as shown below:

enter image description here

How to solve this problem?

+5
source share
1 answer

I have not tried this, but this assumes a way to preserve the transparency of GIF images with PIL when saving:

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

All Articles