gif动图是无法通过opencv读取的,在收集图片素材的时候,我们可能收集到gif动图。
本博客将简述,将gif动图转化png图片。
关于生成gif动图参考如下博客:
【python应用】 gif动图简易生成器
https://jn10010537.blog.csdn.net/article/details/117621530
编写脚本gif2png.py,内容如下:
# -*- coding: utf-8 -*-
# jn10010537
# 读取gif文件,并保存为png图片
# gif2png.py
import sys
impor