~berthold-daum/zora/trunk

« back to all changes in this revision

Viewing changes to com.bdaum.zoom.batch.unix/exiftool/lib/Image/ExifTool/XMPStruct.pl

  • Committer: bdaum
  • Date: 2015-12-26 10:21:51 UTC
  • Revision ID: berthold.daum@bdaum.de-20151226102151-44f1j5113167thb9
VersionĀ 2.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
package Image::ExifTool::XMP;
10
10
 
11
11
use strict;
12
 
use vars qw(%specialStruct $xlatNamespace);
 
12
use vars qw(%specialStruct %stdXlatNS);
13
13
 
14
14
use Image::ExifTool qw(:Utils);
15
15
use Image::ExifTool::XMP;
584
584
            return $val;
585
585
        } else {
586
586
            my (@list, $val);
587
 
            foreach $val (@$value) {    
 
587
            foreach $val (@$value) {
588
588
                my $v = ConvertStruct($et, $tagInfo, $val, $type, $parentID);
589
589
                push @list, $v if defined $v;
590
590
            }
630
630
            # create new entry in tag table for this structure
631
631
            my $g1 = $$table{GROUPS}{0} || 'XMP';
632
632
            my $name = $tag;
 
633
            # tag keys will have a group 1 prefix when coming from import of XML from -X option
633
634
            if ($tag =~ /(.+):(.+)/) {
634
635
                my $ns;
635
636
                ($ns, $name) = ($1, $2);
636
 
                $ns = $$xlatNamespace{$ns} if $$xlatNamespace{$ns};
 
637
                $ns =~ s/^XMP-//; # remove leading "XMP-" if it exists because we add it later
 
638
                $ns = $stdXlatNS{$ns} if $stdXlatNS{$ns};
637
639
                $g1 .= "-$ns";
638
640
            }
639
641
            $strInfo = {
725
727
                # XMP namespace on the tag name.  In this case, add
726
728
                # the corresponding group1 name to the tag ID.
727
729
                my ($ns, $name) = ($1, $2);
728
 
                $ns = $$xlatNamespace{$ns} if $$xlatNamespace{$ns};
 
730
                $ns = $stdXlatNS{$ns} if $stdXlatNS{$ns};
729
731
                $tag = "XMP-$ns:" . ucfirst $name;
730
732
            } else {
731
733
                $tag = ucfirst $tag;