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:])
python pillow 修改gif尺寸大小
最新推荐文章于 2023-12-12 15:43:33 发布