如何使用 IPTC/EXIF 元数据对照片进行分类?

发布于 2024-08-30 21:08:30 字数 460 浏览 7 评论 0原文

许多照片查看和编辑应用程序允许您检查和更改 JPEG 和其他图像文件中的 EXIF 和 IPTC 数据。例如,我可以在佳能 A430 拍摄的图片文件中看到快门速度、光圈和方向等信息。所有这些元数据中有很多很多名称/值对。但是...

如果我想存储一些没有内置字段名称的数据,我该怎么办。假设我正在拍摄一场田径比赛,我想在每张照片上标记参赛者的号码布。我可以创建一个“bib_number”字段并为其指定值“0001”、“5478”、“8124”等,然后搜索bib_number =“5478”的所有照片吗?

我花了几个小时进行搜索,我能想到的最好办法就是将此自定义信息放入“关键字”字段中,但这并不是我想要的。有了这个socution,我必须制作一个查询,例如“关键字包含bib_number_5478”,而我想要的是“bib_number is 5478”。

那么 EXIF 和/或 IPTC 标准是否允许额外的用户定义字段名称?

谢谢 凯夫

Many photo viewing and editing applications allow you to examine and change EXIF and IPTC data in JPEG and other image files. For example, I can see things like shutter speed, aperture and orientation in the picture files that come off my Canon A430. There are many, many name/value pairs in all this metadata. But...

What do I do if I want to store some data that doesn't have a build-in field name. Let's say I'm photographing an athletics competition and I want to tag every photo with the competitor's bib number. Can I create a "bib_number" field and assign it a values of "0001", "5478", "8124" etc, and then search for all photos with bib_number="5478"?

I've spent a few hours searching and the best I can come up with is to put this custom information in the "keywords" field but this isn't quite what I'm after. With this socution I'd have to craft a query like "keywords contains bib_number_5478" whereas what I want it "bib_number is 5478".

So do the EXIF and/or IPTC standards allow addtional user-defined field names?

Thanks
Kev

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

笑脸一如从前 2024-09-06 21:08:30

它可以用于此目的,但实际上不应该:它应该是用户可编辑的,因此不是放置关键元数据的安全位置。使用 XMP sidecar 更适合这种情况:在 XMP 中,根据标准,添加给定应用程序不理解的任何字段都应该被该应用程序忽略并且不会被破坏。

It can be used for that, but it really shouldn't: it's meant to be user-editable and so isn't a safe place to put critical metadata. Using an XMP sidecar is better for this kind of thing: in XMP, any field added that a given app does not understand is, according to the standard, supposed to be ignored by that app and not destroyed.

愚人国度 2024-09-06 21:08:30

我不知道是否有应用程序可以执行此操作,但根据 JPEG 文件描述的标准,有一个名为“注释”的字段,您可以在其中分配可以充当标签的值。

C# 代码:

using System.Windows.Media.Imaging;
using System.IO;

...

FileStream fs = new FileStream(@"<img_path>", FileMode.Open, FileAccess.ReadWrite);
BitmapMetadata bmd = (BitmapMetadata)BitmapFrame.Create(fs).Metadata;
bmd.Comment = "Some Comment Here";

此外,如果您正在寻找已内置此功能的应用程序,那么我可能会推荐 Irfan View(打开图片,转到“图像”菜单,单击“评论”按钮)。

希望这有帮助。

I don't know if there are applications to do this but by the standards described for JPEG files there is a field called Comments where you can assign values that could act like tags.

C# code:

using System.Windows.Media.Imaging;
using System.IO;

...

FileStream fs = new FileStream(@"<img_path>", FileMode.Open, FileAccess.ReadWrite);
BitmapMetadata bmd = (BitmapMetadata)BitmapFrame.Create(fs).Metadata;
bmd.Comment = "Some Comment Here";

also if you are looking for an application that already has this functionality built into it, then might i recommend Irfan View (open pic, go to Image menu, click on Comments button).

Hope this helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文