获取图片属性详细信息
2016-02-21 14:35
197 查看
获取图片属性详细信息,通过PIL库实现,PIL库为2.9.0(3.0版本以下)
![](http://images2015.cnblogs.com/blog/642735/201511/642735-20151124214624390-343235246.png)
python代码实现
http://blog.csdn.net/hnllei/article/details/6972858
![](http://images2015.cnblogs.com/blog/642735/201511/642735-20151124214624390-343235246.png)
python代码实现
#-*-coding:utf8-*- from PIL import Image from PIL.ExifTags import TAGS img = Image.open("img.jpg") print img.size, img.format, img.mode, img.bits print dir(img) print hasattr(img, '_getexif') exifdata = img._getexif() ret = {} for tag, value in exifdata.items(): decode = TAGS.get(tag, tag) ret[decode] = value print ret['DateTimeOriginal'] fp = open("text.txt","wb") fp.write(str(ret)) fp.close() print exifdata[0x9003]
http://blog.csdn.net/hnllei/article/details/6972858
相关文章推荐
- ttf文件属性详细信息
- SSH连接超时不自动断开
- 阿里云服务器加入现有域控的方法
- 阿里云服务器加入现有域控的方法
- 阿里云服务器加入现有域控的方法
- 阿里云服务器加入现有域控的方法
- HLS科普8 播放列表标签-媒体播放列表标签
- C++:重载运算符避免数组越界
- 利用CSS3实现图片切换特效
- 数据结构(9)--链队列的定义以及相关操作的实现
- ScreenCapturePro2 for Joomla_3.4.7-tinymce4x
- SpringMVC原理
- mybaties与hibernate的不同点
- 完美"mix-in"(混入)模式———js对象想怎么玩就怎么玩
- shell脚本远程查看服务器运行时间(不切换到远程服务器上)
- unity描边效果
- 获取手机联系人
- unity描边效果
- webservice 测试窗体只能用于来自本地计算机的请求
- 一分钟看懂NSAttributedString