Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding custom metadata to jpeg files

Tags:

c++

metadata

jpeg

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 ?

like image 822
Senan Avatar asked May 22 '12 09:05

Senan


People also ask

Can you add your own EXIF parameter?

EXIF key-value pairs are called tags, and each tag can contain either a string or numeric value. There are dozens of tags in the current EXIF standard (version 2.32), and anyone — from smartphone and camera manufacturers to photographers — is free to add their own.

Can you add metadata to files?

You can add this information to one or multiple files at a time. You can also save frequently used metadata values as a preset, allowing you to quickly input this information without having to rewrite it. We recommend entering and editing metadata prior to processing your images.

How do I add metadata to photos in Windows 10?

Windows 10 users:Click on the View tab and click on the "Details Pane." This will bring up an info window on the right. There you will find fields to add a title, tags, and author information. 2. Click on the field, type in your information, click SAVE, and you're done!


1 Answers

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.

like image 133
dwalter Avatar answered Sep 30 '22 05:09

dwalter