当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
2 Star 21 Fork 11

hihopeorg / harmonyos-ssd1306
暂停

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gif2imgs.py 407 Bytes
一键复制 编辑 原始数据 按行查看 历史
许师傅 提交于 2020-10-05 14:45 . add new API: ssd1306_DrawBitmap
#!/usr/bin/env python3
import os
import sys
from PIL import Image
if len(sys.argv) < 2:
print('Usage: {} gif outdir'.format(sys.argv[0]))
exit(-1)
gifimg = sys.argv[1]
outdir = sys.argv[2]
im = Image.open(gifimg)
if not os.path.exists(outdir):
os.mkdir(outdir)
i = 0
try:
while True:
im.seek(i)
im.save(os.path.join(outdir, 'frame' + str(i) + '.png'))
i += 1
except:
pass
print('images:', i)
1
https://gitee.com/hihopeorg/harmonyos-ssd1306.git
git@gitee.com:hihopeorg/harmonyos-ssd1306.git
hihopeorg
harmonyos-ssd1306
harmonyos-ssd1306
master

搜索帮助