完整的 xmp/iptc 操作命令行工具或 python 包装器? (操作系统)

发布于 2024-09-29 13:51:48 字数 702 浏览 0 评论 0原文

我正在寻找一个完整的命令行工具,或者更好的 python 包装器来操作和检索图像元数据。

注册像“XMP.imageapp.uuid”这样的新名称空间(也许我错过了一些东西,我很高兴听到一个解决方案。)

我尝试了 pyexiv2 ,这非常好,但我无法使用命令 line tool exiv2 我无法读取某个键的单个值。因此,如果我搜索 Xmp.dc.subject,我必须获取所有 xmp 数据并 grep 值。 (不太好)
使用 exiv2 我可以注册我的命名空间,例如: exiv2 -M 'reg imageapp http://ns.imagapp.pro/imageapp/v1/ ' -M'set Xmp.imageapp.uuid asdfasd' 1.jpg

但后来我遇到了问题,因为有时(无法找到时间和地点)它设置了一个 xmptag 'Xmp.imageapp_1_.uuid' 并且我在删除它时遇到问题,因为一旦我删除它,另一个标签就会以“Xmp.imageapp_1_1.uuid”形式出现,

我更喜欢使用 python 工具,因为我的应用程序是用 python 编写的。有谁知道如何使用 pyexiv2 注册新的命名空间,或者有谁知道什么最适合我的情况?

谢谢

im searching for a complete command line tool or even better a python wrapper to manipulate and retrieve image metadata.

i tried pyexiv2 which is very nice but i cant register a new namespace like 'XMP.imageapp.uuid' (maybe im missing something and i would be glad to hear a solution for that.)

with the command line tool exiv2 i can't read a single value for a key. so if im searching for Xmp.dc.subject i have to get all the xmp data and grep the value. (not that nice)
with exiv2 i can register my namespace like:
exiv2 -M 'reg imageapp http://ns.imagapp.pro/imageapp/v1/' -M'set Xmp.imageapp.uuid asdfasd' 1.jpg

but then i have problems because sometimes (couldn't find when and where) it sets an xmptag 'Xmp.imageapp_1_.uuid' and i have problems deleting it because as soon as i delete it, another tag appears in form 'Xmp.imageapp_1_1.uuid'

i would prefer to use a python tool because my app is written in python. does anyone know how to register a new namespace with pyexiv2 or does anyone know whats best to use for my case?

thanx

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文