python pillow 修改gif尺寸大小

from PIL import Image
from PIL import ImageSequence
im = Image.open('large.gif')
resize_frames= [frame.resize((frame.width//2,frame.height//2)) for frame in ImageSequence.Iterator(im)]
resize_frames[0].save("small.gif", save_all=True, append_images=resize_frames[1:])

猜你喜欢

转载自blog.csdn.net/u011519550/article/details/120460892