Main Menu

Add new xmp tag

Started by siline, August 28, 2017, 09:44:19 AM

Previous topic - Next topic

siline

Hi!
I would like to add a new xmp tag "Xmp.Camera.IrradianceRelativeRotation = 173, 0, 0"

I tried with this, but it does not work:
%Image::ExifTool::UserDefined::Camera = (
    GROUPS => { 0 => 'XMP', 1 => 'XMP-Camera', 2 => 'Image' },
    NAMESPACE => { 'Camera' => 'http://pix4d.com/camera/1.0/' },
    WRITABLE => 'string', # (default to string-type tags)
    # Example 8.  XMP-xxx:NewXMPxxxTag1 (an alternate-language tag)
    # - replace "NewXMPxxxTag1" with your own tag name (eg. "MyTag")
    IrradianceRelativeRotation => { Writable => 'XmpText' },
    
);

C:\exiftool -config "c:\con.config" -xmp-Camera:IrradianceRelativeRotation="173, 0, 0" "C:\workingspace\*.tif"

Could you please help?

Best Regards,
Si

Phil Harvey

Hi Si,

You also need to add the Camera namespace to the Image::ExifTool::XMP::Main lookup, like how the "xxx" namespace is added in the example config file.

Also, "XmpText" is not a valid Writable format.  Just remove the Writable entry to make it writable as a string (the default you have set).

- 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 ($).

siline

Hi Phil,

I am new for exif script.
Now, I got confuse for the namespace. I thought, I replaced xxx by Camera.

%Image::ExifTool::UserDefined::Camera = (
    GROUPS => { 0 => 'XMP', 1 => 'XMP-Camera', 2 => 'Image' },
    NAMESPACE => { 'Camera' => 'http://pix4d.com/camera/1.0/' },

Could you please give me the script?

Thanks,
Siliine

StarGeek

Take a look at the config file at the line that starts:
# new XMP namespaces (eg. xxx) must be added to the Main XMP table:

That's where you need to add your new namespace (Camera) to the main XMP table.

At least, that's what I think needs to be done, I really haven't played with adding new XMP namespace that much.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

siline

 :) Thank very much. I got what you mean.
It is a great help.