I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2010-01-05 18:55:52-08 by janmartin
How to write custom tag and value to GPS Group?
Hi Phil,

I am still trying to create a custom tag in the GPS group and write content to it.

The following does not work yet:
me@me-u904:~$ perl /home/me/scripts/custom_tag.pl
Sorry, MyNewTag is not writable

May I ask for your help?
Thanks,
Jan

#!/usr/bin/perl use warnings; # Most of this file copied from: # http://cpanforum.com/threads/7404#7424 # ============================== Load modules ==================================== use Image::ExifTool qw(:Public); my ($picFile); $picFile = '/home/me/image_001.jpg'; $tagvalue = <<END; Jipeee, it works! END # print $tagvalue; #define ExifTool object; my $ExifTool = new Image::ExifTool; # adapted from http://owl.phy.queensu.ca/~phil/exiftool/config.html %Image::ExifTool::UserDefined = ( 'Image::ExifTool::Exif::Main' => { 0xd000 => { Name => 'MyNewTag', Writable => 'int16u', WriteGroup + => 'GPS', }, } ); $ExifTool->SetNewValue('MyNewTag', $tagvalue); $ExifTool->WriteInfo($picFile); print "After mod=============================================== \n"; my $info = ImageInfo($picFile); foreach (keys %$info) { print "$_ => $$info{$_}\n"; } #end
Direct Responses: 12116 | Write a response