这个模块使用很简单,下面是示例:

file_name = '/path/to/xxx.JPG'

from libxmp import XMPFiles, consts
xmpfile = XMPFiles(file_path=file_name, open_forupdate=True)
xmp = xmpfile.get_xmp()

print(xmp.get_property("http://www.dji.com/drone-dji/1.0/", 'SelfData'))
print(xmp.does_property_exist('http://www.dji.com/drone-dji/1.0/', 'SelfData'))
print(xmp)
print(xmp.get_array_item('http://ns.adobe.com/exif/1.0/', 'ComponentsConfiguration',4))
print(xmp.count_array_items('http://ns.adobe.com/exif/1.0/', 'ComponentsConfiguration'))
print(xmp.get_property_datetime('http://ns.adobe.com/photoshop/1.0/', 'DateCreated'))
print(xmp.get_namespace_for_prefix('drone-dji'))
 

相关文章:

  • 2021-09-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-21
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案