Is it possible to create a custom namespace tag in XMP Dublin core metadata?

4.2k Views Asked by At

I am curious to know whether it is possible to create a custom namespace for the XMP Dublin Core metadata?

For example If I want to add a tag like mytest

I can write the XMP Metadata standard tags such as description however I can't write my own tag

~/$ exiftool -xmp-dc:description="Foo" demo.png
    1 image files updated
~/$ exiftool -xmp-dc:mytest="Bar" demo.png
Warning: Tag 'mytest' does not exist
Nothing to do.
1

There are 1 best solutions below

0
On BEST ANSWER

Yes. Defining custom XMP tags and namespaces in ExifTool is done via user-defined tags in a config file. For example:

~/$ exiftool -config my.config -xmp-dc:mytest="Bar" demo.png
    1 image files updated
~/$ exiftool -xmp-dc:mytest demo.png
Mytest                          : Bar
~/$ cat my.config
%Image::ExifTool::UserDefined = (
    'Image::ExifTool::XMP::dc' => {
        mytest => { },
    },
);
# end

See the sample ExifTool config file for more details.