Problem with custom XMP tag

Started by sam.hepworth, July 27, 2011, 09:57:09 AM

Previous topic - Next topic

sam.hepworth

Hi,

I have created config file with two XMP custom tags. It looks like this:

%Image::ExifTool::UserDefined = (
    'Image::ExifTool::XMP::xmp' => {
        CameraDate => { Groups => { 2 => 'Author' } },
    },
    'Image::ExifTool::XMP::xmp' => {
        Identifier => { Groups => { 2 => 'Author' } },
    }
);
1;

The  Identifier tag works, but there is a problem with the CameraDate tag. This commandline:
exiftool.exe -config ExifTool.cfg 20101031-IX870-22.50.27.jpg -CameraDate=Test -Identifier=Test

Output:
Warning: Tag 'CameraDate' does not exist
    1 image files updated

I do not understand why a tag called CameraDate does not work but a tag called Identifier does. Maybe there is a small bug in ExifTool?

/Sam

Phil Harvey

Hi Sam,

Your 2nd definition is overriding the first.  Try this:

%Image::ExifTool::UserDefined = (
    'Image::ExifTool::XMP::xmp' => {
        CameraDate => { Groups => { 2 => 'Time' } },
        Identifier => { },
    }
);


Also, I have changed the family 2 groups to something more reasonable.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

sam.hepworth

Hi Phil,

Thanks! It works :) I wonder what the meaning of " Groups => { 2 => 'Time' }"  is?

/Sam

Quote from: Phil Harvey on July 27, 2011, 10:04:06 AM
Hi Sam,

Your 2nd definition is overriding the first.  Try this:

%Image::ExifTool::UserDefined = (
    'Image::ExifTool::XMP::xmp' => {
        CameraDate => { Groups => { 2 => 'Time' } },
        Identifier => { },
    }
);


Also, I have changed the family 2 groups to something more reasonable.

- Phil

Phil Harvey

This sets the family 2 group name for the tag.  These group names are only used to group tags into categories for use with the -g2 option.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

sam.hepworth