from PIL import Image
from PIL import ImageSequence
im = Image.open('./loading3.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:])
print("Done!")
原gif:
修改后: