简体   繁体   English

将元数据附加到图像

[英]Attach metadata to image

Assuming my question here gets answered what are the options to attaching meta data to an image in my thumbs folder? 假设我的问题在这里得到了回答,可以使用哪些选项将元数据附加到我的thumbs文件夹中的图像?

I thought of placing an xml file in the folder which contains the filename and then the description of it but feel this to be a little clunky. 我想到将xml文件放在包含文件名和其描述的文件夹中,但是觉得这有点笨拙。

For various reasons I can't use a database in this project which is very limiting. 由于种种原因,我不能在这个项目中使用数据库,这是非常有限的。

Is there a way to write meta data to the jpg file? 有没有办法将元数据写入jpg文件?

The problem i'm trying to solve is that I need to display the image along with a short description of what it is. 我要解决的问题是我需要显示图像以及它的简短描述。 kinda like a caption if you like. 如果喜欢的话,有点像字幕。

Any thoughts would be very welcome. 任何想法都将受到欢迎。

thanks. 谢谢。

I have written an application that writes metadata into the image file itself into the various namespaces IPTC, EXIF, IFD and XMP. 我编写了一个将元数据写入图像文件本身的应用程序,并将其写入各种名称空间IPTC,EXIF,IFD和XMP。 The code is available here . 该代码可在此处获得 You can use the code to write/read metadata to and from the images. 您可以使用代码在图像之间写入/读取元数据。 Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM