Image-ExifTool - Re: Help needed with adding custom tags

Posted on Wed Mar 19 19:11:29 2008 by exiftool in response to 7407 (See the whole thread of 13)
Re: Help needed with adding custom tags
Hi Mark,

What you have done is basically correct.

The sample config file gives examples of how to set various attributes. The "2 => 'Image'" sets the family 2 group name for tags in the table (and is "Other" unless specified). This is simply used for catagorizing tags for your convenience and doesn't affect what is written.

You don't need anything inside the braces in the tag definition for simple strings in XMP. The examples show how to specify a different family 2 group name for an individual tag, and how to make a "List"-type tag. The "List" tags are written differently, and multiple may contain multiple values (like a keywords list).

If you want to do anything more complex, check lib/Image/ExifTool/XMP.pm for examples of how it is done, and read lib/Image/ExifTool/README for all the gory details. Basically though, there is almost none of this that you need to know if you just want to add simple tags with no special formatting.

Just 2 points: 1) you have given all your tags the same name, so only one tag will be defined. 2) you still need to add the new namespace to the Image::ExifTool::XMP::Main table as is done in the sample config file.

- Phil - Phil
Direct Responses: 7412 | Write a response