~berthold-daum/zora/trunk

« back to all changes in this revision

Viewing changes to com.bdaum.zoom.batch.unix/exiftool/lib/Image/ExifTool/WriteIPTC.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:
129
129
        }
130
130
        if (defined $minlen) {
131
131
            $maxlen or $maxlen = $minlen;
132
 
            return "String too short (minlen is $minlen)" if $len < $minlen;
133
 
            if ($len > $maxlen and not $et->Options('IgnoreMinorErrors')) {
134
 
                $$et{CHECK_WARN} = "[minor] IPTC:$$tagInfo{Name} exceeds length limit (truncated)";
 
132
            if ($len < $minlen) {
 
133
                unless ($$et{OPTIONS}{IgnoreMinorErrors}) {
 
134
                    return "[Minor] String too short (minlen is $minlen)";
 
135
                }
 
136
                $$et{CHECK_WARN} = "String too short for IPTC:$$tagInfo{Name} (written anyway)";
 
137
            } elsif ($len > $maxlen and not $$et{OPTIONS}{IgnoreMinorErrors}) {
 
138
                $$et{CHECK_WARN} = "[Minor] IPTC:$$tagInfo{Name} exceeds length limit (truncated)";
135
139
                $$valPtr = substr($$valPtr, 0, $maxlen);
136
140
            }
137
141
        }
213
217
        } elsif ($tz =~ /Z/i) {
214
218
            $tz = '+0000';  # UTC
215
219
        } else {
216
 
            # use local system timezone by default 
 
220
            # use local system timezone by default
217
221
            my (@tm, $time);
218
222
            if ($date and $date =~ /^(\d{4}):(\d{2}):(\d{2})\s*$/ and eval { require Time::Local }) {
219
223
                # we were given a date too, so determine the local timezone
512
516
                    $doSet = 1 if not $found and $$nvHash{IsCreating};
513
517
                }
514
518
                if ($doSet) {
515
 
                    @values = $et->GetNewValues($nvHash);
 
519
                    @values = $et->GetNewValue($nvHash);
516
520
                    @values and $foundRec{$newRec}->{$newTag} = $found | 0x04;
517
521
                    # write tags for each value in list
518
522
                    my $value;
629
633
        my $nvHash = $$et{NEW_VALUE}{$Image::ExifTool::Photoshop::iptcDigestInfo};
630
634
        last unless defined $nvHash;
631
635
        last unless IsStandardIPTC($et->MetadataPath());
632
 
        my @values = $et->GetNewValues($nvHash);
 
636
        my @values = $et->GetNewValue($nvHash);
633
637
        push @values, @{$$nvHash{DelValue}} if $$nvHash{DelValue};
634
638
        my $new = grep /^new$/, @values;
635
639
        my $old = grep /^old$/, @values;