python 读取git图片每一帧
2015-09-16 17:49
537 查看
def processImage(infile): try: im = Image.open(infile) except IOError: print "Cant load", infile sys.exit(1) i = 0 mypalette = im.getpalette() try: while 1: #im.putpalette(mypalette) new_im = Image.new("RGBA", im.size) new_im.paste(im) new_im.save('0000_'+str(i)+'.png') i += 1 im.seek(im.tell() + 1) except EOFError: pass # end of sequence
相关文章推荐
- Python 获取时间戳
- Python 获取时间戳
- Python处理JSON(转)
- python常用模块
- Python+OpenCV学习(15)---Lucas Kanade 角点光流轨迹跟踪
- 【D2】Python一周入门
- Python 进行RSA私钥加密,公钥解密
- 升级Python导致yum报错
- python pexpect 启动、与子进程交互的例子--logstash
- Myeclipse + Python2.7.9,搭建Python开发环境
- Python改回之前版本的方法
- python:PyInstaller打包发布单个文件错误struct.error: argument for 's' must be a string解决
- 浅析python 中__name__ = '__main__' 的作用
- python知识点总结
- python上机题:黑色星期五
- JAVA读写Python脚本
- python指定时间运行函数
- python数值工厂函数和功能函数
- [python] 0x5 Python Tutorial: Web Requests
- python torndb模块