Python 几张图片生成gif图

import imageio
def compose_gif():
    img_paths = ["img/1.jpg","img/2.jpg","img/3.jpg","img/4.jpg"
    ,"img/5.jpg","img/6.jpg"]
    gif_images = []
    for path in img_paths:
        gif_images.append(imageio.imread(path))
    imageio.mimsave("test.gif",gif_images,fps=1)

你可能感兴趣的:(python)