Adding custom metadata to jpeg files

家住魔仙堡 提交于 2020-02-03 05:29:16

问题


I'm working on an Image processing project(C++) and I need to write custom metadata to jpeg file after the processing is complete. How can I accomplish this? Is there any library available to do it ?


回答1:


If you're talking about EXIF Metadata you may want to look at exiv2 which is a C++ library for processing EXIF metadata. There is a second lib which is called libexif and is written in C.

Exiv2 has a view examples on their website and a the API is well documented.

UPDATE: If you want to add custom metadata you could either use the MakerNote or the Comment tag.

Exif Standard: PDF see Section 4.6.5 EXIF IFD Attribute Information Table 7, Tags Relating to User Information.

     MakerNote    Type Undefined Count Any
     Comment      Type Undefined Count Any

which means you're allowed to use those 2 tags for any data you want.



来源:https://stackoverflow.com/questions/10699494/adding-custom-metadata-to-jpeg-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!