使用python创建gif

比较好用

def create_gif(image_list, gif_name):
    frames = []
    for image_name in image_list:
        if image_name.endswith('.png'):
            print(image_name)
            frames.append(imageio.imread(image_name))
    # Save them as frames into a gif
    imageio.mimsave(gif_name, frames, 'GIF', duration=0.5)

    return

你可能感兴趣的:(工程经验,html,前端)