当前位置: 首页 > 工具软件 > gif2png > 使用案例 >

【python中级】gif动图转化png工具

郎飞航
2023-12-01

1、背景

gif动图是无法通过opencv读取的,在收集图片素材的时候,我们可能收集到gif动图。
本博客将简述,将gif动图转化png图片。

关于生成gif动图参考如下博客:
【python应用】 gif动图简易生成器
https://jn10010537.blog.csdn.net/article/details/117621530

2、代码

编写脚本gif2png.py,内容如下:

# -*- coding: utf-8 -*-
# jn10010537
# 读取gif文件,并保存为png图片
# gif2png.py
import sys
impor
 类似资料: