【发布时间】:2021-05-01 17:01:12
【问题描述】:
我一直在尝试运行以下代码:
exif = pyexiv2.ImageMetadata(image_file)
exif.read()
在 Python 3.7.0 上,它会产生错误 AttributeError: module 'pyexiv2' has no attribute 'ImageMetadata'
我以前没有使用过 pyexiv2,但 here 的示例与我的相似,我认为它可以正常工作。我也不确定 Python 3 是否完全支持 pyexiv2。 请指教。
你可以找到我正在使用的脚本here
【问题讨论】:
-
您的示例链接显示
pyexiv2.metadata.ImageMetadata,而不是pyexiv2.ImageMetadata -
@furas 你可以在标题
buffer下找到参考代码meta = pyexiv2.ImageMetadata("lena.jpg")
标签: python image metadata exif pyexiv2