The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities.
The pyexif python library and tools aims at extracting EXIF information from Jpeg and Tiff files which include it. This information is typically included in images created using digital imaging devices such as digital cameras, digital film scanners, etc.
from PIL import Image
from PIL.ExifTags import TAGS
def get_exif(fn):
ret = {}
i = Image.open(fn)
info = i._getexif()
for tag, value in info.items():
decoded = TAGS.get(tag, tag)
ret[decoded] = value
return ret
您可能要签出exif-py:
或者Python Imaging Library (PIL):
还有一个恰当命名的pyexif:http://pyexif.sourceforge.net/
不过,看起来pyexif已经很久没有更新了。他们建议如果他们的页面没有做检查EXIF py的技巧,那么您可能应该先尝试一下,因为他们的sourceforge页面最近似乎有一些活动,尽管不多。最后,使用PIL可以做到:
免责声明:
我真的不知道哪一个是最好的,这正是我能和谷歌拼凑起来的。:)
我最近一直在使用pyexiv2功能,它似乎非常适合我的需要。也许它也适合你的。
相关问题 更多 >
编程相关推荐