Thread

Posted on Mon Oct 30 22:55:06 2006 by airmoi
Add new XMP group?
Hi there! I'm trying to set values in a special XMP group but It told me key doesn't exist or isn't writable. I can see keys I want to modify using imageInfo() but I think exiftool just doesn't support that XMP group. Its a special group created by Ressouces service at my work. Is there a way to add its support into exiftool? I found some code in image::exiftool::xmp as well as in writexmp. Tryed to add my group in but it still doesn't works.
Direct Responses: 3401 | Write a response
Posted on Tue Oct 31 22:33:55 2006 by exiftool in response to 3386
Re: Add new XMP group?
Yes. The ExifTool_config file included with the distribution shows you to add write support for custom XMP groups.

- Phil
Direct Responses: 3460 | Write a response
Posted on Thu Nov 9 18:33:00 2006 by binouch in response to 3401
Re: Add new XMP group?
Hello, I just discovered this new module and the concept of what it could do is fantastic. I'm trying to put it into "production" in my environment but i'm running into some difficulties. I would like to add custom tags to files. Here is what i've done so far but infortunately i get the "Tag 'CustomerName' does not exist" error. I built a .ExifTool_config file that i put in both the EXIFTOOL_HOME directory and the dir in which i am running the script from (just to make sure - this is running on linux). Here is the content of the .ExifTool_config file :
%Image::ExifTool::UserDefined::myCompany = ( GROUPS => { 0 => 'XMP', 1 => 'XMP-xxx', 2 => 'Image' }, NAMESPACE => { 'myCompany' => 'http://ns.myname.com/xxx/1.0/' }, WRITABLE => 'string', # replace "NewXMPxxxTag1" with your own tag name (ie. "MyTag") CustomerName => { }, NewXMPxxxTag2 => { Groups => { 2 => 'Author' } }, NewXMPxxxTag3 => { List => 'Bag' }, ); # The %Image::ExifTool::UserDefined hash defines new tags to be # added to existing tables. %Image::ExifTool::UserDefined = ( # new XMP namespaces (ie. XMP-xxx) must be added to the Main XMP table: 'Image::ExifTool::XMP::Main' => { myCompany => { SubDirectory => { TagTable => 'Image::ExifTool::UserDefined::myCompany', }, }, }, );
And the script i'm running to write a new value to that tag on a file is the following :
#!/usr/bin/perl use Image::ExifTool; my $exifTool = new Image::ExifTool; $exifTool->SetNewValue(CustomerName => "Bla Inc"); $exifTool->WriteInfo('/raid1/Jobs/newCompany/Jacobs_018.tif');
Any kind of help would be appreciated - I'd really like to get this module working. Thank you in advance. Ben
Write a response