Branch Coverage

blib/lib/Image/ExifTool/Writer.pl
Criterion Covered Total %
branch 1881 3354 56.0


line true false branch
325 43 5731 unless (defined $tag)
332 218 5513 if (ref $value)
333 78 140 if (ref $value eq 'ARRAY') { }
127 13 elsif (ref $value eq 'SCALAR') { }
336 51 27 if (@$value > 1) { }
341 2 151 if ref $_
343 21 132 if $e
347 1 50 if $noJoin
354 0 27 if ref $value eq "SCALAR"
362 5394 29 if defined $value and not ref $value and not $options{'Sanitized'}
365 574 5156 if $tag =~ /(.*):(.+)/
368 4 5726 if $tag =~ s/#$//
372 5208 522 if $convType eq "PrintConv"
376 2469 3261 if ($wantGroup)
378 0 2497 unless length $_ and /^(\d+)?(.*)/
382 2388 109 unless $lcg eq "*" or $lcg eq "all"
383 1 2496 if ($g =~ s/^ID-//i) { }
30 2466 elsif (defined $f) { }
384 0 1 if defined $f and $f ne 7
387 0 30 if $f > 2
388 9 21 if $f == 2
390 102 2364 if $family2groups{$lcg}
393 109 2360 unless @wantGroup
397 39 5691 if lc $tag eq "all"
405 35 14 if ($wantGroup) { }
406 35 0 unless $wantGroup =~ /^XM[LP]-\*$/i
408 4 31 if (@del and $remove)
410 2 2 if $excludeGroups{$del[0]}
416 0 10 if (ref $parent)
420 4 6 unless $dirName = $parent || shift @dirNames
426 7 28 if $wantGroup =~ /^(MIE\d+|XM[LP]-[-\w]*\w)$/i
431 49 0 if (@del) { }
0 0 elsif (grep /^$wantGroup$/i, @delGroup2) { }
436 23 952 if ($remove) { }
438 4 19 if ($grp =~ /^(XM[LP])(-.*)?$/)
440 1 3 if ($grp eq $x) { }
3 0 elsif ($$delGroup{"$x-*"} and not $$delGroup{"-$grp"}) { }
443 65 2 unless /^(-?)$x-/
444 2 0 unless $1
449 2 1 if ($delGroup->{$x})
458 15 8 if (exists $delGroup->{$grp}) { }
461 5 3 unless $didExcl
466 66 886 if ($delMore{$grp})
474 1 48 if ($verbose > 1 and @donegrps)
476 0 1 $remove ? :
485 0 49 if wantarray
486 0 49 if $err
495 27 5654 if ($writeMode ne "wcg")
496 25 2 unless $writeMode =~ /w/i
497 2 25 if (not $writeMode =~ /c/i) { }
8 17 elsif (not $writeMode =~ /g/i) { }
498 0 2 if $createOnly
507 19 2334 if defined $fg->[0] and $fg->[0] != 1
511 131 2203 if (/^IFD(\d+)$/i) { }
0 2203 elsif (/^SubIFD(\d+)$/i) { }
0 2203 elsif (/^Version(\d+)$/i) { }
274 1929 elsif ($exifDirs{$_}) { }
293 1636 elsif ($allFam0{$_}) { }
1 1635 elsif (/^Track(\d+)$/i) { }
2 1633 elsif (/^MIE(\d*-?)(\w+)$/i) { }
519 1120 elsif (not $ifdName and /^XMP\b/i) { }
519 274 0 unless $ifdName and $allFam0{$_}
530 519 0 if ($writeProc)
536 701 1633 if $grpName and $grpName ne $_
546 55 1367 if ($tag =~ /^([?*\w]+)-([a-z]{2})(_[a-z]{2})$/i or $tag =~ /^([?*\w]+)-([a-z]{2,3}|[xi])(-[a-z\d]{2,8}(-[a-z\d]{1,8})*)?$/i) { }
1367 0 elsif (not $options{'NoShortcut'}) { }
552 22 3 length $3 == 3 ? :
25 30 if $3
556 0 291 unless $tagInfo->{'Table'}
557 65 226 unless my $langInfoProc = $tagInfo->{'Table'}{'LANG_INFO'}
559 200 26 if $langInfo
561 53 2 if @matchingTags
567 1 1366 if ($match)
572 0 3 if $e
574 1 0 if $numSet
575 0 1 if wantarray
576 0 1 if $err
580 1368 0 unless ($listOnly)
581 47 1321 if (not &TagExists($tag)) { }
0 1321 elsif ($langCode) { }
509 812 elsif ($wantGroup) { }
582 47 0 if ($tag =~ /^[-\w*?]+$/) { }
583 28 19 $wantGroup ? :
585 2 45 if $origTag =~ /-/
586 0 47 if (not $pre and uc $origTag eq "TAG")
591 0 0 if $tag =~ /^\$/
600 0 1368 if $verbose > 2
603 1368 0 if wantarray
604 0 0 if $err
620 26018 49677 unless defined $highestPriority{$lcTag}
622 812 74883 defined $tagInfo->{'Preferred'} ? :
623 54807 20888 if ($wantGroup)
630 233 54614 if $translateWantGroup{$lcWant}
633 2229 52618 if $prfTag
634 54567 280 if (not defined $fam) { }
2 278 elsif ($fam == 7) { }
156 244 elsif ($fam != 1 and not $tagInfo->{'AllowGroup'}) { }
635 2240 52327 if ($lcWant eq lc $grp[0])
638 4 2236 if $wgAll and not $writeGroup
641 12054 40273 if $lcWant eq lc $grp[2]
643 1 1 if &IsSameID($tagInfo->{'TagID'}, $lcWant)
645 24 132 if $lcWant eq lc $grp[$fam]
646 5 10 if ($wgAll and not $fam and $allFam0{$lcWant})
647 3 2 unless $writeGroup
653 1644 38752 if ($grp[0] eq 'EXIF' or $grp[0] eq 'SonyIDC' or $wgAll) { }
1765 36987 elsif ($grp[0] eq 'QuickTime') { }
767 36220 elsif ($grp[0] eq 'MIE') { }
36214 6 elsif (not $tagInfo->{'AllowGroup'} && $lcWant =~ /^$tagInfo->{'AllowGroup'}$/i) { }
654 1194 450 unless ($ifdName and $lcWant eq lc $ifdName)
655 37 7 unless $wgAll and not $fam and $allFam0{$lcWant}
656 2 5 unless $writeGroup
659 2 47 if $wgAll and $allFam0{$lcWant} and $fam
661 0 448 if $lcWant eq "PreviewIFD"
664 16 1749 if ($grp[1] eq 'Track#') { }
665 15 1 unless $movGroup and $lcWant eq lc $movGroup
669 1701 48 unless $grp and $lcWant eq lc $grp
673 765 2 unless $mieGroup and $lcWant eq lc $mieGroup
676 0 0 if ($writeGroup =~ /^MIE\d+$/ and $tagInfo->{'Table'}{'WRITE_GROUP'})
682 35669 545 unless $lcWant eq lc $grp[1]
685 14844 497 unless $writeGroup
694 9 36220 if ($table->{'SRC_TABLE'})
696 0 9 unless $writeProc
698 36229 0 if ($writeProc)
700 13 36216 unless (ref $writeProc)
702 13 0 if $module =~ s/::\w+$//
705 119 36110 unless $writeProc and &$writeProc()
710 0 22903 unless $writable or $table->{'WRITABLE'} and not defined $writable and not $tagInfo->{'SubDirectory'}
712 20864 3 if (not $writeGroup or $translateWriteGroup{$writeGroup} and !$tagInfo->{'WriteGroup'} || $tagInfo->{'WriteGroup'} ne 'All')
719 16893 3971 unless $writeGroup
721 20783 81 unless ($priority)
722 26 20757 if ($tagInfo->{'Avoid'} and $tagInfo->{'WriteAlso'}) { }
726 3760 16997 unless ($priority)
732 1233 19631 if $prfTag
736 31 36078 if $noFlat and defined $tagInfo->{'Flat'}
737 2350 33759 if ($prot)
739 1217 1133 if ($prot)
742 1 1216 if ($verbose > 1)
753 467 398 if $table->{'GROUPS'}{'0'} eq "QuickTime" and !defined($highestQT{$lcTag}) || $highestQT{$lcTag} < $priority
754 11013 23879 if ($priority > $highestPriority{$lcTag}) { }
14682 9197 elsif ($priority == $highestPriority{$lcTag}) { }
757 1457 9556 $tagInfo->{'Avoid'} ? :
761 347 14335 if $tagInfo->{'Avoid'}
763 115 34777 if ($tagInfo->{'WriteAlso'}) { }
770 5911 28981 if ($writeGroup eq "XMP")
772 0 5911 if $wg
780 115 4197 if @writeAlsoList
786 18 10166 if ($preferred{$lcTag} and $highestPriority{$lcTag} == 0 and %{$self->{'WRITE_PRIORITY'};})
792 1538 0 if ($avoid{$lcTag} and $preferred{$lcTag})
793 1377 161 if ($avoid{$lcTag} < scalar keys %{$preferred{$lcTag};}) { }
48 113 elsif ($highestPriority{$lcTag} < 1000) { }
796 5700919 6203 unless $lcTag eq lc $tagInfo->{'Name'}
797 1687 4516 if $tagInfo->{'Avoid'}
804 32426 122 unless $lcTag eq lc $tagInfo->{'Name'}
805 1 121 unless my $priority = $tagPriority{$tagInfo}
806 49 72 if $priority == $highestPriority{$lcTag}
807 0 72 if $priority < $nextHighest
809 72 0 unless defined $permanent
810 5 67 if $tagInfo->{'Avoid'} or $permanent
811 44 23 if $writeGroup{$tagInfo} eq "MakerNotes"
812 18 5 if ($nextHighest < $priority)
818 13 35 if (@nextBestTags)
837 9 34867 if $alsoWrote{$tagInfo}
839 221 34646 if defined $listOnly and $listOnly ^^ $tagInfo->{'List'}
843 34040 606 unless defined $permanent
844 33639 1007 unless defined $permanent
850 26 2136 if not $pref->{$tagInfo} and $tagInfo->{'Avoid'} and $tagInfo->{'WriteAlso'}
853 169 34451 if (defined $shift)
856 0 169 if ($tagInfo->{'List'}) { }
860 24 145 unless ($shift)
862 24 0 if $addValue
865 0 0 if $options{'DelValue'} and defined $shiftable and $shiftable eq "Time"
867 0 169 if ($shift and not defined $value && length $value)
876 0 0 if (defined $shiftable and not $shiftable and $shift || $shiftable eq '0' && $options{'DelValue'})
881 0 0 if $verbose
886 22299 12321 if (defined $val) { }
8125 4196 elsif ($permanent) { }
0 4196 elsif ($addValue or $options{'DelValue'}) { }
888 9 22290 if ($addValue and not $shift || $tagInfo->{'List'})
889 0 9 if ($addValue eq '2') { }
893 0 9 if $verbose > 2
897 169 22121 if ($shift) { }
39 22082 elsif (not length $val and $options{'DelValue'}) { }
2 44138 elsif (ref $val eq 'HASH' and not $tagInfo->{'Struct'}) { }
898 51 118 if ($tagInfo->{'Shift'} and $tagInfo->{'Shift'} eq 'Time') { }
114 4 elsif (&IsFloat($val)) { }
900 19 32 $shift > 0 ? :
904 0 51 if ($err2)
906 0 0 if $verbose > 2
913 0 4 if $verbose > 2
921 0 2 if $verbose > 2
925 4 8121 if $options{'IgnorePermanent'}
927 33 8088 if (defined $tagInfo->{'DelValue'}) { }
935 0 0 if $verbose > 2
938 7 4189 if ($tagInfo->{'DelCheck'})
941 0 7 if $@
942 7 0 if (defined $err2)
944 4 3 unless $err2
945 0 3 unless $err2 =~ /delete$/
947 0 3 if $verbose > 2
952 3 4186 if ($tagInfo->{'DelGroup'} and not $options{'DelValue'})
956 0 3 if ($delMore{$tag})
961 0 3 if $verbose
969 30168 4423 unless ($noConv)
974 9920 20248 if (defined $e)
976 18 9902 unless $e
980 3047 31526 if (not defined $val and defined $value)
983 3047 0 unless $options{'DelValue'}
986 223 31303 unless $self->{'NEW_VALUE'}
987 14376 17150 if ($options{'Replace'})
991 25 14351 if ($tagInfo->{'WriteAlso'})
994 6 19 if ($tagInfo->{'WriteGroup'} and $tagInfo->{'WriteGroup'} eq 'All' and $writeGroup) { }
1005 293 14083 if $options{'Replace'} == 2
1008 20415 10818 if (defined $val) { }
6749 4069 elsif ($permanent) { }
0 4069 elsif ($addValue or $options{'DelValue'}) { }
1013 0 20415 unless $nvHash
1014 325 20090 if $tagInfo->{'List'} and not $options{'Replace'}
1016 65 20350 if $editOnly
1018 27 20388 if $tagInfo->{'MakerNotes'}
1019 49 20366 if ($createOnly) { }
236 20130 elsif ($options{'DelValue'} or $addValue or $shift) { }
1025 234 2 unless $nvHash->{'DelValue'}
1026 165 71 if ($shift) { }
58 13 elsif ($options{'DelValue'}) { }
1031 8 11 unless $val eq "" or $tagInfo->{'List'}
1033 2 56 ref $val eq 'ARRAY' ? :
1034 0 58 if ($verbose > 1)
1035 0 0 $permanent ? :
1036 0 0 $tagInfo->{'List'} ? :
1037 0 0 ref $val eq 'ARRAY' ? :
1039 0 0 if (ref $_ eq "HASH")
1051 253 20162 defined $tagInfo->{'Preferred'} ? :
1053 793 19622 if ($tagInfo->{'Table'}{'GROUPS'}{'0'} eq "QuickTime")
1054 472 321 if $tagPriority{$tagInfo} < $highestQT{$lcTag}
1056 9583 10832 if ($pref->{$tagInfo} or $prf)
1057 5786 3797 if ($permanent or $shift) { }
3783 14 elsif ($tagInfo->{'List'} and not $options{'DelValue'} or not $nvHash->{'DelValue'} && @{$nvHash->{'DelValue'};} or grep /^$/, @{$$nvHash{'DelValue'};}) { }
1066 19 3750 $editGroup ? :
14 3769 $editOnly ? :
1068 2473 1310 unless $createGroups
1073 3772 16643 if ($nvHash->{'IsCreating'}) { }
22 16621 elsif ($createOnly) { }
1074 177 3595 if (%{$self->{'DEL_GROUP'};})
1077 10651 409 if $self->{'DEL_GROUP'}{$grp} == 2
1082 1 176 if ($verbose > 1 and @grps)
1088 9 5 $tagInfo->{'Avoid'} ? :
8 14 $permanent ? :
1089 0 5 $shift ? :
5 17 unless $noCreate
1090 0 22 if $verbose > 2
1093 20335 58 if ($shift or not $options{'DelValue'})
1094 19783 552 unless $nvHash->{'Value'}
1095 19806 529 if (not $tagInfo->{'List'}) { }
0 529 elsif (defined $nvHash->{'AddBefore'} and @{$nvHash->{'Value'};} >= $nvHash->{'AddBefore'}) { }
1101 0 0 ref $val eq 'ARRAY' ? :
1104 45 484 ref $val eq 'ARRAY' ? :
1106 26 20309 if ($verbose > 1)
1108 0 26 if ($tagInfo->{'IsComposite'}) { }
1110 0 0 if ($tagInfo->{'WriteAlso'}) { }
1121 0 0 $nvHash->{'IsCreating'} == 2 ? :
0 16 $nvHash->{'IsCreating'} == 2 ? :
0 16 $createOnly ? :
0 10 $nvHash->{'DelValue'} && @{$nvHash->{'DelValue'};} ? :
16 10 $nvHash->{'IsCreating'} ? :
1124 0 26 $addValue ? :
0 26 $shift ? :
1130 0 6749 if $verbose > 1
1133 0 0 if $verbose > 1
1140 0 4069 if $verbose > 1
1142 1431 23031 if $setTags
1143 11468 12994 if $pref->{$tagInfo}
1148 76 24408 if ($writeAlso)
1151 46 30 if ($tagInfo->{'WriteGroup'} and $tagInfo->{'WriteGroup'} eq 'All' and $writeGroup) { }
1173 7 236 unless defined $val
1174 0 243 if $@
1175 243 0 unless ($Image::ExifTool::evalWarning)
1179 148 84 if $n and $pref->{$tagInfo}
1181 9 2 if ($Image::ExifTool::evalWarning and !$err || $verbose > 2)
1183 9 0 if ($str)
1184 9 0 unless $str =~ / for [-\w:]+$/
1186 9 0 unless $err
1187 0 9 if $verbose > 2
1195 86 4222 if (defined $err and not $prioritySet) { }
622 3600 elsif (not $numSet) { }
0 3600 elsif ($self->{'CHECK_WARN'}) { }
451 6298 elsif ($err and not $verbose) { }
1196 0 86 if $err and not wantarray
1198 432 190 $wantGroup ? :
1199 363 259 if ($wasProtected) { }
252 7 elsif (not $listOnly) { }
1201 351 12 unless ($options{'Replace'} and $options{'Replace'} == 2)
1205 0 252 if ($origTag =~ /[?*]/) { }
0 252 elsif ($noCreate) { }
0 252 elsif ($foundMatch) { }
252 0 elsif ($wantGroup and @matchingTags) { }
1206 0 0 if ($noCreate) { }
0 0 elsif ($foundMatch) { }
1225 603 19 if ($err)
1226 0 603 if $verbose > 2
1227 0 603 unless wantarray
1231 0 0 if $verbose > 2
1235 3837 471 if wantarray
1269 44 15 if @setTags
1273 0 59 if ($opts{'Type'})
1277 0 0 $opts{'Type'} eq 'PrintConv' ? :
1279 55 4 $printConv ? :
1280 0 59 defined $options->{'Struct'} ? :
1282 0 59 if (ref $srcFile and UNIVERSAL::isa($srcFile, 'Image::ExifTool')) { }
1294 15 44 if $structOpt eq 2 and not @setTags
1322 0 59 $options->{'FastScan'} && $options->{'FastScan'} > 1 ? :
0 59 defined $options->{'StrictDate'} ? :
1326 0 59 if ($options->{'Geolocation'} and not grep(/\bGeolocation/i, @setTags))
1333 1 70 if ref $tag
1335 8 62 if $tag =~ /^-(.*)/
1338 31 31 if (/(.+?)\s*(>|<)\s*(.+)/)
1339 10 21 if ($2 eq '>') { }
1343 8 13 if /\$/
1346 54 0 if /(^|:)([-\w?*]+)#?$/
1348 7 52 if (@exclude)
1352 43 16 if @reqTags
1357 0 0 if $info->{'Error'} and $info->{'Error'} eq "Error opening file" and not $self->{'ALT_EXIFTOOL'}
1363 768 8373 if (/ /) { }
1373 15 44 unless (@setTags)
1379 4 2647 if $tag =~ /^(Error|Warning)\b/
1381 0 2647 if ($opts{'SrcType'} and $opts{'SrcType'} ne $srcType)
1385 7 2640 if $fixup
1389 978 1669 unless $n
1390 7 2640 if $fixup
1401 1 70 if (ref $t eq "HASH")
1414 31 39 if ($tag =~ /(.+?)\s*(>|<|=)(\s*)(.*)/) { }
1417 10 21 if ($2 eq '>') { }
1420 0 10 if $tag =~ s/\s*([-+])$// or $dstTag =~ s/^([-+])\s*//
1423 0 21 if $dstTag =~ s/\s*([-+])$//
1424 0 21 if ($op eq '=') { }
8 13 elsif ($tag =~ /\$/) { }
1427 0 0 unless $dstTag =~ s/\^$// or length $tag
1437 0 13 if $tag =~ s/^([-+])\s*//
1440 3 28 if $dstTag =~ s/^\+//
1442 0 23 unless ($opts->{'EXPR'} or $opts->{'ASSIGN'} or &ValidTagName($tag))
1446 0 31 unless &ValidTagName($dstTag)
1448 0 31 if ($opt)
1452 16 15 if $dstTag =~ /(.*):(.+)/
1454 0 31 if $dstTag =~ s/#$//
1456 3 28 if $dstTag eq "all"
1458 0 39 if $tag =~ s/^\+//
1460 62 0 unless ($opts->{'EXPR'} or $opts->{'ASSIGN'})
1462 34 28 if ($tag =~ /(.*):(.+)/)
1466 0 35 unless length $_ and /^(\d+)?(.*)/
1468 0 35 if !$f || $f eq '7' and $g =~ s/^ID-//i
1469 3 0 if ($g =~ /^file\d+$/i and !$f || $f eq '8')
1472 3 0 if ($srcExifTool->{'ALT_EXIFTOOL'}{$g8})
1474 1 2 unless $altFiles{$g8}
1479 26 9 unless $g eq "*" or $g eq "all"
1483 0 62 if ($tag =~ s/#$//)
1485 0 0 unless $dstTag
1488 14 48 if $tag eq "all"
1490 3 59 if ($tag =~ /[?*]/ and $tag ne "*")
1497 31 39 if ($dstTag) { }
8 31 elsif ($isExclude) { }
1499 0 31 if $isExclude
1507 1 7 unless @setList
1510 1 30 $opts->{'WILD'} ? :
1521 1 0 if (%$altInfo)
1528 63 8 if $set->[2]
1531 0 44 if $assign == @setList
1536 14 6480 if ($tag =~ /^(Error|Warning)( |$)/)
1537 1 13 if ($tag eq 'Warning DUMMY') { }
1549 1126 9408 if $opts->{'EXPR'}
1550 570 8838 if $opts->{'GROUP8'} xor $isAlt
1552 6212 2626 unless ($set->[1] eq $lcTag or $set->[1] eq "*")
1554 6196 16 unless $opts->{'WILD'} and $lcTag =~ /^$set->[1]$/
1557 1474 1168 if (@{$set->[0];})
1559 1370 104 unless (@grp)
1565 1512 4 if (not defined $f) { }
0 4 elsif ($f == 7) { }
1566 1016 496 unless $grp{$g}
1568 0 0 unless &IsSameID(scalar $srcExifTool->GetTagID($tag), $g)
1570 0 4 unless defined $grp[$f] and $g eq $grp[$f]
1574 174 1452 unless $set->[2]
1584 8 63 if ($opts->{'EXPR'} or $opts->{'ASSIGN'})
1586 8 0 if ($opts->{'EXPR'}) { }
1589 0 8 if ($err)
1592 0 0 unless ($noWarn and eval { do { $err =~ /$noWarn/ } } || $err =~ s/^\[minor\] //i && eval { do { $err =~ /$noWarn/ } })
1600 0 0 unless defined $val
1606 8 0 unless $dstTag =~ /[?*]/ and $dstTag ne "*"
1607 0 8 if $dstGrp
1609 8 0 if $rtnVals[0]
1611 0 8 if $rtnVals[1]
1616 0 1452 if ($opts->{'SrcType'} and $opts->{'SrcType'} ne $srcType) { }
1622 1370 82 if ($dstGrp) { }
1627 286 1086 unless /^(\d*)(all|\*)$/i
1628 0 1086 length $1 ? :
1636 7 1445 if ($srcExifTool->{'TAG_INFO'}{$tag}{'MakerNotes'})
1640 1419 33 if ($dstTag eq "*")
1644 1415 37 if ($set->[1] eq '*' or $set->[3]{'WILD'}) { }
1647 26 118 if $srcExifTool->{'TAG_INFO'}{$tag}{'Protected'} and $srcExifTool->{'TAG_INFO'}{$tag}{'Binary'}
1651 1389 0 $structOpt eq '2' ? :
1654 37 0 unless $dstTag =~ /[?*]/
1664 0 1426 if ($wrn and not $noWarn)
1670 666 760 if $rtn
1691 4229 3077 if (ref $tag eq 'HASH' and $tag->{'IsNVH'} or not defined $tag) { }
1695 2962 115 if ($self->{'NEW_VALUE'})
1697 53 2909 if (ref $tag) { }
1551 1358 elsif (defined($tagInfo = $Image::ExifTool::Extra{$tag}) and $tagInfo->{'Writable'}) { }
1706 5 1353 if $tag =~ s/(.*)://
1710 1358 4 unless my $nvh = $self->GetNewValueHash($tagInfo)
1713 0 2 if $_ eq $nvh->{'WriteGroup'}
1715 0 2 if ($grps[0] eq $nvh->{'WriteGroup'}) { }
1717 0 0 if $_ eq $grps[1]
1720 2 0 if $_ eq $grps[0]
1723 0 0 if /^ID-(.*)/i and &IsSameID($tagInfo->{'TagID'}, $1)
1725 0 0 unless $nvh = $nvh->{'Next'}
1729 2 2 if defined $nvHash->{'IsCreating'}
1734 2140 937 if $newValueHashPt
1736 4952 2354 unless ($nvHash and $nvHash->{'Value'})
1737 1930 3022 if wantarray
1743 60 2294 if ($nvHash->{'TagInfo'}{'RawConvInv'} or $nvHash->{'Shift'})
1750 26 34 if $nvHash->{'Shift'} and $table
1755 26 34 if ($checkProc) { }
1757 0 26 if ($err or not defined $val)
1758 0 0 unless $err
1763 26 0 unless $conv
1765 0 34 unless $conv
1768 2 32 if (ref $conv eq 'CODE') { }
1773 0 32 if $@
1775 0 34 if ($Image::ExifTool::evalWarning)
1777 0 0 if ($Image::ExifTool::evalWarning ne "\n")
1787 1164 1190 if (wantarray)
1789 0 1164 if (@$vals > 1 and $self->Options("NoDups"))
1809 226 19 if ($newVal)
1815 19 19736 if $tagInfo->{'WriteNothing'}
1817 1 19735 if $tagInfo->{'WritePseudo'}
1821 0 245 unless wantarray
1840 116 0 unless $nvHash->{'Save'}
1867 1 0 if ($newValues)
1873 27 554 if ($nvHash->{'Save'}) { }
1877 0 554 if ($lastHash) { }
2 552 elsif ($nvHash->{'Next'}) { }
1890 1 0 if ($savedValues)
1891 0 1 unless $newValues
1893 2 87 if ($newValues->{$key}) { }
1917 0 6 unless $g8 =~ /^File\d+$/
1919 0 6 if (not defined $file) { }
6 0 elsif (not $self->{'ALT_EXIFTOOL'}{$g8} && !($file =~ /\$/) && $self->{'ALT_EXIFTOOL'}{$g8}{'ALT_FILE'} eq $file) { }
1943 0 0 unless defined $tag
1945 0 0 unless defined $val
1947 0 0 unless $isOverwriting
1950 0 0 if $tag eq "FileCreateDate" and $^O ne "MSWin32"
1951 0 0 if ($isOverwriting < 0)
1953 0 0 unless (defined $originalTime)
1955 0 0 $tag eq 'FileCreateDate' ? :
1956 0 0 unless defined $originalTime
1959 0 0 unless $isUnixTime
1960 0 0 unless $self->IsOverwriting($nvHash, $originalTime)
1964 0 0 if ($tag eq 'FileCreateDate') { }
1965 0 0 unless eval { do { require Win32::API } }
1966 0 0 unless eval { do { require Win32API::File } }
1971 0 0 unless $self->SetFileTime($file, $aTime, $mTime, $cTime, 1)
1993 1 0 unless $opt
1995 1 0 unless (defined $newName)
1996 0 1 if ($opt) { }
1997 0 0 if ($opt eq 'HardLink' or $opt eq 'Link') { }
0 0 elsif ($opt eq 'SymLink') { }
0 0 elsif ($opt eq 'Test') { }
2004 0 0 unless defined $newName
2007 1 0 if defined $filename and $self->IsOverwriting($nvHash, $file)
2009 0 1 if defined $dir and $self->IsOverwriting($nvHash, $file)
2010 0 1 unless $doName or $doDir
2011 1 0 if ($doName) { }
2013 0 1 if $doDir
2020 0 1 if ($^O eq 'MSWin32') { }
2021 0 0 if ($newName =~ /[\0-\x1f<>"|*]/)
2025 0 0 if ($newName =~ /:/ and not $newName =~ /^[A-Z]:[^:]*$/i)
2029 0 0 if ($newName =~ /\?/ and not $newName =~ m[^[\\/]{2}\?[\\/][^?]*$])
2033 0 0 if ($newName =~ m[(^|[\\/])(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(\.[^.]*)?$]i)
2037 0 0 if ($newName =~ /([. ])$/)
2038 0 0 if $self->Warn("New file name not recommended for Windows (ends with '$1')", 2)
2040 0 0 if (length $newName > 259 and not $newName =~ /\?/)
2041 0 0 if $self->Warn("New file name not recommended for Windows (exceeds 260 chars)", 2)
2047 0 1 unless length $newName
2049 0 0 if ($self->Exists($newName, 1) and !defined($usedFlag) || $usedFlag)
2050 0 0 if ($file ne $newName or $opt =~ /Link$/) { }
2052 0 0 if ($opt =~ /Link$/ or not $self->IsSameFile($file, $newName))
2061 0 1 if ($opt eq "Test")
2068 0 1 if (defined $err)
2069 0 0 if ($err)
2070 0 0 unless $err =~ /^Error creating/
2076 0 1 if ($opt eq 'HardLink' or $opt eq 'Link') { }
0 1 elsif ($opt eq 'SymLink') { }
2077 0 0 unless (link $file, $newName)
2085 0 0 if $^O eq "MSWin32"
2090 0 0 if (not $file =~ m[^/] and $newName =~ m[/])
2091 0 0 unless (eval { do { require Cwd } })
2096 0 0 unless (defined $file)
2101 0 0 unless (eval { do { symlink $file, $newName } })
2110 0 1 unless ($self->Rename($file, $newName))
2113 0 0 unless ($self->Open(\*EXIFTOOL_SFN_IN, $file))
2117 0 0 unless ($self->Open(\*EXIFTOOL_SFN_OUT, $newName, ">"))
2126 0 0 unless print EXIFTOOL_SFN_OUT $buff
2128 0 0 unless close EXIFTOOL_SFN_OUT
2130 0 0 if ($err)
2139 0 0 unless $self->Unlink($file)
2158 0 232 if (defined $perm)
2159 0 0 if (eval { do { chmod $perm & 4095, $file } }) { }
2169 0 232 if (defined $uid or defined $gid)
2170 0 0 unless defined $uid
2171 0 0 unless defined $gid
2172 0 0 if (eval { do { chown $uid, $gid, $file } }) { }
2173 0 0 if $uid >= 0
2174 0 0 if $gid >= 0
2178 0 0 unless $result
2185 1624 0 unless $nvHash
2186 0 0 if ($^O eq 'darwin') { }
0 0 elsif ($tag ne 'FileCreateDate') { }
2187 0 0 if ref $file
2190 0 0 if $res == 1 or not $result
2199 0 232 if ($zhash)
2201 0 0 if ($^O ne 'MSWin32') { }
0 0 elsif (ref $file) { }
0 0 elsif (defined $self->GetNewValue('ZoneIdentifier', \$zhash)) { }
0 0 elsif (not eval { do { require Win32API::File } }) { }
2212 0 0 if ($self->EncodeFileName($zfile)) { }
2218 0 0 if ($wattr == Win32API::File::INVALID_FILE_ATTRIBUTES()) { }
0 0 elsif ($wattr & Win32API::File::FILE_ATTRIBUTE_READONLY()) { }
2223 0 0 if ($wide) { }
2224 0 0 if eval { do { Win32API::File::DeleteFileW($zfile) } }
2226 0 0 if eval { do { Win32API::File::DeleteFile($zfile) } }
2228 0 0 if ($res > 0) { }
2235 0 0 if $res == 1 or not $result
2268 0 0 if ($setModDate and $self->IsOverwriting($nvHash) < 0 and defined $infile and ref $infile ne "SCALAR")
2274 0 0 if ($setCreateDate and $self->IsOverwriting($nvHash2) < 0 and defined $infile and ref $infile ne "SCALAR")
2277 0 0 unless defined $cTime
2284 4 241 if (not defined $outfile and defined $infile)
2288 0 4 if defined $hardLink and not length $hardLink
2289 0 4 if defined $symLink and not length $symLink
2290 0 4 if defined $testName and not length $testName
2293 0 4 if (defined $newDir and length $newDir) { }
2294 0 0 unless $newDir =~ m[/$]
2298 1 3 if ($numNew == $numPseudo) { }
0 6 elsif (defined $newFileName and length $newFileName) { }
2300 1 0 if (defined $newFileName || defined $newDir and not ref $infile)
2302 1 0 if ($result > 0) { }
0 0 elsif ($result < 0) { }
2309 1 0 if (not ref $infile or UNIVERSAL::isa($infile, "GLOB"))
2310 0 1 if $setModDate
2311 0 1 if $setCreateDate
2312 0 1 if $self->SetSystemTags($infile) > 0
2314 0 1 if (defined $hardLink or defined $symLink or defined $testName)
2315 0 0 if $hardLink and $self->SetFileName($infile, $hardLink, "HardLink")
2316 0 0 if $symLink and $self->SetFileName($infile, $symLink, "SymLink")
2317 0 0 if $testName and $self->SetFileName($infile, $testName, "Test")
2323 0 0 if (ref $infile) { }
0 0 elsif ($self->IsOverwriting($nvHash, $infile)) { }
2332 0 3 if (defined $newDir)
2333 0 0 unless defined $outfile or ref $infile
2334 0 0 if (defined $outfile)
2336 0 0 unless ref $infile
2343 5 239 if (ref $infile) { }
215 24 elsif (defined $infile and $infile ne '') { }
0 24 elsif (not defined $outfile) { }
2345 1 4 if (UNIVERSAL::isa($inRef, 'GLOB')) { }
0 4 elsif (UNIVERSAL::isa($inRef, 'File::RandomAccess')) { }
0 4 elsif ($] >= 5.006 and $self->{'OPTIONS'}{'EncodeHangs'} || eval { do { require Encode; &Encode::is_utf8($$inRef) } } || $@) { }
2355 0 0 $] < 5.01 ? :
0 0 $self->{'OPTIONS'}{'EncodeHangs'} || $@ ? :
2357 0 0 if (defined $outfile) { }
2365 2 213 unless defined $outfile
2366 215 0 if ($self->Open(\*EXIFTOOL_FILE2, $infile)) { }
2383 23 1 unless $outType or ref $outfile
2384 24 0 if (&CanCreate($outType)) { }
0 0 elsif ($outType) { }
2385 24 0 if ($self->{'OPTIONS'}{'WriteMode'} =~ /g/i) { }
2402 30 214 unless (@fileTypeList)
2403 24 6 if ($fileType) { }
2413 13 231 if (ref $outfile) { }
1 230 elsif (not defined $outfile) { }
0 230 elsif ($self->Exists($outfile, 1)) { }
230 0 elsif ($self->Open(\*EXIFTOOL_OUTFILE, $outfile, '>')) { }
2415 0 13 if (UNIVERSAL::isa($outRef, 'GLOB')) { }
2420 13 0 unless defined $$outRef
2426 0 1 if ($raf)
2441 0 0 $tmpfile ? :
2449 244 0 unless $raf
2451 1 243 if ($numNew == $numPseudo) { }
0 243 elsif (not ref $infile and $infile eq '-' || $infile =~ /\|$/) { }
2456 0 1 unless &Write($outRef, $buff)
2472 24 219 unless $raf->Read($hdr, 1024)
2473 0 243 unless $raf->Seek($inPos, 0)
2478 35 243 if ($Image::ExifTool::magicNumber{$type} and length $hdr and not $hdr =~ /^$Image::ExifTool::magicNumber{$type}/s)
2479 35 0 if @fileTypeList
2487 110 133 if ($type eq 'JPEG' or $type eq 'EXV') { }
13 120 elsif ($type eq 'TIFF') { }
118 2 elsif (exists $writableType{$type}) { }
0 2 elsif ($type eq 'ORF' or $type eq 'RAW') { }
2 0 elsif ($type eq 'EXIF') { }
2491 0 13 if (grep /^$tiffType$/, @{$Image::ExifTool::noWriteFile{'TIFF'};}) { }
2495 0 13 if ($tiffType eq "FFF")
2504 91 27 if (ref $writableType{$type} eq 'ARRAY') { }
2521 2 0 if (defined $buff) { }
2522 2 0 &Write($outRef, $buff) ? :
2530 243 0 if $rtnVal
2531 0 0 unless @fileTypeList
2533 0 0 unless $raf->Seek($inPos, 0)
2534 0 0 if (UNIVERSAL::isa($outRef, 'GLOB')) { }
2541 0 243 unless ($rtnVal)
2543 0 0 if ($seekErr) { }
0 0 elsif ($fileType and defined $rtnVal) { }
0 0 elsif ($fileType) { }
2546 0 0 if ($self->{'VALUE'}{'Error'}) { }
0 0 elsif ($fileType eq 'RAW') { }
2551 0 0 if ($wrongType) { }
2556 0 0 unless $Image::ExifTool::magicNumber{$type}
2557 0 0 unless $hdr =~ /^$Image::ExifTool::magicNumber{$type}/s
2567 0 0 if $infile and &GetFileType($infile)
2572 0 0 if $err
2579 244 0 if ($rtnVal > 0)
2580 0 24 if ($outType and $type and $outType ne $type)
2582 0 0 unless (grep /^$type$/, @types)
2587 0 244 if ($rtnVal > 0 and not &Tell($outRef) and not $self->{'VALUE'}{'Error'})
2589 0 0 if (defined $hdr and length $hdr) { }
2590 0 0 unless defined $type
2596 0 244 if $self->{'VALUE'}{'Error'}
2600 1 243 if (defined $outBuff)
2601 0 1 if ($rtnVal <= 0 or not $self->{'CHANGED'}) { }
1 0 elsif (UNIVERSAL::isa($inRef, 'GLOB')) { }
2612 0 1 unless seek $inRef, 0, 2 and ($size = tell $inRef) >= 0 and seek $inRef, 0, 0 and print $inRef $outBuff and $len >= $size || eval { do { truncate $inRef, $len } }
2619 215 29 if ($closeIn)
2621 0 215 unless close $inRef or not defined $outBuff
2622 215 0 if ($rtnVal > 0)
2624 0 215 if ($^O eq "darwin" and -s "$infile/..namedfork/rsrc")
2625 0 0 if ($self->{'DEL_GROUP'}{'RSRC'}) { }
2632 0 0 if ($self->Open(\*SRC, "$infile/..namedfork/rsrc")) { }
2633 0 0 if ($self->Open(\*DST, "$outfile/..namedfork/rsrc", '>')) { }
2637 0 0 unless print DST $buf
2639 0 0 unless close DST or $err
2648 0 0 if $err and $self->Error("Error $err Mac OS resource fork", 2)
2652 0 215 if $eraseIn
2656 230 14 if ($closeOut)
2658 0 230 unless close $outRef
2660 0 230 if ($rtnVal <= 0) { }
2 228 elsif ($tmpfile) { }
2665 0 2 unless ($self->Rename($tmpfile, $infile))
2667 0 0 if (not $self->Unlink($infile)) { }
0 0 elsif (not $self->Rename($tmpfile, $infile)) { }
2677 2 0 if $rtnVal > 0
2681 231 0 if ($rtnVal > 0 and $closeOut || defined $outBuff && ($closeIn || UNIVERSAL::isa($infile, 'GLOB')))
2682 230 1 $closeOut ? :
2684 0 231 if $self->SetSystemTags($target) > 0
2685 206 25 if ($closeIn)
2686 0 206 if $setModDate and $self->SetFileModifyDate($target, $originalTime, undef, 1) > 0
2688 0 206 if $setCreateDate and $self->SetFileModifyDate($target, $createTime, "FileCreateDate", 1) > 0
2690 0 206 if defined $hardLink and $self->SetFileName($target, $hardLink, "HardLink")
2691 0 206 if defined $symLink and $self->SetFileName($target, $symLink, "SymLink")
2692 0 206 if defined $testName
2696 0 244 if ($rtnVal < 0) { }
244 0 elsif ($rtnVal > 0) { }
2697 0 0 unless $self->{'VALUE'}{'Error'}
2700 5 239 unless $self->{'CHANGED'}
2718 0 0 if $group
2728 0 0 if ($table->{'GROUPS'} and $table->{'GROUPS'}{'0'} eq "XMP")
2737 0 0 unless $tag
2739 0 0 if $tagInfo->{'SubDirectory'} and not $tagInfo->{'Writable'}
2740 0 0 if $tagInfo->{'Hidden'}
2741 0 0 if (@groups)
2744 0 0 unless grep /^$group$/i, @tg
2763 0 0 if $group
2773 0 0 if ($table->{'GROUPS'} and $table->{'GROUPS'}{'0'} eq "XMP")
2778 0 0 if (@parts > 3)
2790 0 0 unless $tag
2793 0 0 unless $writable or $table->{'WRITABLE'} and not defined $writable and not $tagInfo->{'SubDirectory'}
2794 0 0 if $tagInfo->{'Hidden'}
2795 0 0 if (@groups)
2798 0 0 unless grep /^$group$/i, @tg
2817 0 0 if ref $family
2819 0 0 if $family == 3
2820 0 0 if $family == 4
2821 0 0 if $family == 5
2822 0 0 if ($family == 6)
2826 0 0 if $family == 8
2836 0 0 if $family == 1
2843 0 0 if $grps = $table->{'GROUPS'} and $grp = $grps->{$family}
2846 0 0 if ($family == 7) { }
2849 0 0 if (not defined $id) { }
0 0 elsif ($id =~ /^\d+$/) { }
2852 0 0 if $self and $self->{'OPTIONS'}{'HexTagIDs'}
2860 0 0 unless $grps = $tagInfo->{'Groups'} and $grp = $grps->{$family}
2897 0 2 unless my $table = &GetTagTable($tableName)
2903 0 2 if $Image::ExifTool::specialTags{$tagID}
2930 0 5467 if ref $$valPt eq "SCALAR"
2934 0 5467 if ($] >= "5.006" and $self->{'OPTIONS'}{'EncodeHangs'} || eval { do { require Encode; &Encode::is_utf8($$valPt) } } || $@)
2940 0 0 $] < 5.01 ? :
0 0 $self->{'OPTIONS'}{'EncodeHangs'} || $@ ? :
2944 92 5375 if ($self->{'OPTIONS'}{'Escape'})
2946 0 92 if ($self->{'OPTIONS'}{'Escape'} eq 'XML') { }
92 0 elsif ($self->{'OPTIONS'}{'Escape'} eq 'HTML') { }
2968 70 30171 unless $convType
2971 30241 46826 if (not defined $type) { }
22688 24138 elsif ($type eq 'PrintConv') { }
2973 600 29641 if ($tagInfo->{'List'})
2975 75 0 if (defined $listSplit and not $tagInfo->{'Struct'} and $wantGroup || !defined($wantGroup))
2978 59 0 if $listSplit eq 1 and $tagInfo->{'AutoSplit'}
2980 41 0 @splitVal ? :
34 41 @splitVal > 1 ? :
2988 13 0 if ($tagInfo->{'RawJoin'} and $tagInfo->{'List'} and not ref $val)
2990 13 0 if @splitVal > 1
2994 296 23842 if ($tagInfo->{'WriteCheck'})
2997 0 296 if $@
2999 24096 42 unless (defined $err2)
3001 23154 874 if ($table and $table->{'CHECK_PROC'} and not $tagInfo->{'RawConvInv'})
3003 47 23107 if (ref $val eq 'ARRAY') { }
3007 0 139 if $err2
3014 3817 20321 if (defined $err2)
3015 3809 8 if ($err2) { }
3028 29108 23821 unless defined $conv or defined $convInv
3031 12 23809 if (ref $val eq 'ARRAY') { }
153 23656 elsif (ref $conv eq 'ARRAY' or ref $convInv eq 'ARRAY') { }
3039 153 0 if (ref $conv eq "ARRAY")
3043 30 123 if (ref $convInv eq "ARRAY")
3050 13979 9894 if ($convInv) { }
9891 3 elsif ($conv) { }
3054 196 13783 if (ref $convInv eq 'CODE') { }
3059 199 13584 if $@
3061 227 13752 if ($Image::ExifTool::evalWarning) { }
137 13615 elsif (not defined $val) { }
3063 10 217 if ($Image::ExifTool::evalWarning eq "\n") { }
3064 10 0 unless defined $err
3077 9580 311 if (ref $conv eq 'HASH' and !exists($$tagInfo{"${type}Inv"}) || $convInvList) { }
288 23 elsif (not $tagInfo->{'WriteAlso'}) { }
3080 0 0 if ($self->{'CUR_LANG'} and $type eq "PrintConv" and ref($lc = $self->{'CUR_LANG'}{$tag}) eq "HASH" and $lc = $lc->{'PrintConv'})
3087 0 0 unless defined $lc->{$val}
3090 0 0 if ($conv->{'BITMASK'})
3093 0 0 unless defined $lc->{$val}
3100 105 9475 if ($conv->{'BITMASK'}) { }
3104 2 103 if ($err2) { }
72 31 elsif (defined $val2) { }
3107 2 0 unless (defined $val)
3122 5449 4129 if (not defined $val) { }
0 4129 elsif ($Image::ExifTool::evalWarning) { }
3123 3552 1897 $multi ? :
0 5449 $Image::ExifTool::evalWarning ? :
3137 17646 124 unless @valList
3139 72 52 if (++$index >= @valList)
3141 12 60 $tagInfo->{'List'} ? :
3144 16 36 if $convList
3145 11 41 if $convInvList
3160 1 20 if (ref $val eq 'ARRAY' and ref $val->[0] ne 'HASH') { }
0 20 elsif (ref $val eq 'SCALAR') { }
0 20 elsif (ref $val eq 'HASH' or ref $val eq 'ARRAY') { }
1 19 elsif (not defined $val) { }
3163 0 0 if ($self->{'OPTIONS'}{'Binary'} or $$val =~ /^Binary data/) { }
3173 0 1 if $missing and defined $mval
3207 0 10 if ($docGrp) { }
3208 0 0 $docGrp =~ /(\d+(-\d+)*)$/ ? :
3212 0 10 unless $foundTags
3217 0 14 if ($var eq "\$" or $var eq "/")
3218 0 0 if $bra
3219 0 0 if ($var eq '/') { }
0 0 elsif ($line =~ /^self\b/ and not $rtnStr =~ /\$$/) { }
3234 0 14 if $line =~ s/^#//
3236 2 12 if ($bra and $line =~ s/^\@(#)?//)
3238 0 2 if $1
3242 4 4 if ($bra and not $line =~ s/^\s*\}// and $line =~ s/^\s*;\s*(.*?)\s*\}//s)
3249 4 4 unless $level and $line =~ s/^(.*?)\s*\}//s
3254 0 4 unless length $expr
3258 0 14 unless @tags
3265 2 12 if $asList
3268 0 14 if ($cache and not $lcTag =~ /(^|:)all$/) { }
3271 0 0 if $tag =~ s/^(.*)://
3275 0 0 unless ($cacheTag)
3280 0 0 if defined $group
3283 0 0 if (defined $cacheTag->{$doc})
3284 0 0 unless $cacheTag->{$doc} =~ / \((\d+)\)$/
3287 0 0 if / \((\d+)\)$/ and $1 < $cur
3292 0 0 $lcTag =~ /\b(main|doc(\d+(-\d+)*)):/ ? :
3293 0 0 if ($cacheTag->{$doc})
3299 0 14 if ($docGrp and not $lcTag =~ /\b(main|doc\d+):/)
3304 3 11 if ($tag =~ s/(\bfile\d+)://i)
3306 3 0 if ($et) { }
3313 0 14 if ($lcTag eq 'all') { }
0 14 elsif (defined $et->{'OPTIONS'}{'UserParam'}{$lcTag}) { }
4 10 elsif ($tag =~ /(.*):(.+)/) { }
0 10 elsif ($tag eq 'self') { }
3322 1 0 if $1
1 3 if ($group =~ s/(^|:)(all|\*)(:|$)/$3 if $1;/ie) { }
0 3 elsif (lc $tag eq 'all') { }
3323 1 0 if (lc $tag eq 'all') { }
3324 1 0 $group ? :
3327 0 0 if $group
3332 0 0 $et->GroupMatches($group, $fileTags) ? :
3338 0 3 if (defined $val and $tg =~ / \((\d+)\)$/)
3341 0 0 if not $tag =~ / \((\d+)\)$/ or $1 > $tagNum
3345 2 1 unless $tag =~ / /
3354 7 3 unless (defined $val)
3357 7 0 if (defined $tg)
3364 2 12 if $asList
3367 14 0 unless @tags
3369 14 0 if (@val) { }
0 0 elsif (defined $val) { }
3370 0 14 if defined $val
3376 4 10 if (defined $expr and defined $val)
3380 2 2 if ($asList) { }
3384 0 7 if $@
3388 2 0 @val ? :
3393 0 2 if $@
3394 0 2 ref $_ eq 'ARRAY' ? :
3396 0 4 if ($Image::ExifTool::evalWarning)
3397 0 0 $docGrp && !($var =~ /\b(main|doc\d+):/i) ? :
3399 0 0 if ($opt)
3400 0 0 if ($opt eq 'Error') { }
0 0 elsif ($opt ne 'Silent') { }
3410 0 0 unless (defined $val or ref $opt and $self->{'OPTIONS'}{'UndefTags'})
3412 0 0 unless (defined $val)
3413 0 0 $docGrp && !($var =~ /\b(main|doc\d+):/i) ? :
3414 0 0 $didExpr ? :
3416 0 0 if (ref $opt) { }
0 0 elsif ($opt) { }
3417 0 0 if $self->{'OPTIONS'}{'IgnoreMinorErrors'}
3420 0 0 if $opt eq "Silent" or &$opt($self, $msg, 2)
3425 0 14 if (ref $opt eq 'HASH') { }
3426 0 0 if $type
3427 0 0 if (defined $expr)
3451 0 0 if ($Image::ExifTool::advFmtSelf and defined($shift = $Image::ExifTool::advFmtSelf->{'OPTIONS'}{'GlobalTimeShift'}))
3456 0 0 unless defined $_
3457 0 0 if $shift
3468 0 0 $Image::ExifTool::advFmtSelf ? :
3470 0 0 $_[0] && $new eq $_ ? :
3495 0 0 unless (@tagInfo)
3496 0 0 if &TagExists($tag)
3501 0 0 $tagInfo->{'Writable'} ? :
0 0 if defined $tagInfo->{'Writable'}
3502 0 0 if $tagInfo->{'Table'}{'WRITABLE'}
3505 0 0 if ($writeProc)
3508 0 0 if $tagInfo->{'Writable'}
3521 0 0 unless lc $file eq lc $file2
3528 0 0 if ($self->Open(\*TMP1, $tmp1, ">"))
3530 0 0 if $self->Exists($tmp2)
3534 0 0 if ($interrupted and $SIG{'INT'})
3560 2 0 if (defined $mode and not defined $self->GetNewValue("FilePermissions"))
3565 2 0 if (defined $uid and defined $gid and not defined $newUid && defined $newGid)
3566 0 2 if defined $newGid
3567 0 2 if defined $newUid
3581 0 1 unless defined $dir
3582 0 1 if ($newName =~ m[/$]) { }
1 0 elsif (not $newName =~ m[/]) { }
3597 0 0 unless exists $info->{$tag}
3601 0 0 unless exists $info->{$key}
3612 62 9513 unless defined $val
3614 40 9473 if ($val =~ /^Unknown\s*\((.*)\)$/i) { }
3616 0 40 if ($val =~ /^0x([\da-fA-F]+)$/)
3635 17506 7249 unless $matches
3637 3907 3342 if ($matches > 1 and not $pattern =~ /\$$/)
3640 461 11260 if defined $conv->{$_} and $conv->{$_} =~ /$pattern/
3642 3775 132 if $matches > 1
3645 6810 3425 if not $conv->{$_} =~ /$pattern/ or $ignorePrintConv{$_}
3651 6048 3425 unless ($found)
3653 808 5240 if ($conv->{'OTHER'}) { }
3660 3775 2273 if $matches > 1
3663 9466 47 if wantarray
3679 42 6666 unless $nvHash
3681 6549 117 unless $nvHash->{'DelValue'}
3684 13 104 unless @{$nvHash->{'DelValue'};} or defined $shift
3686 58 46 unless defined $val
3690 3 43 if ($conv)
3693 0 3 if (ref $conv eq 'CODE') { }
3700 0 3 if $@
3702 0 3 unless defined $val
3705 6 40 if $nvHash->{'CreateOnly'}
3707 13 27 if (defined $shift)
3709 6 7 unless ($shiftType and $shiftType eq "Time")
3710 0 6 unless (&IsFloat($val))
3713 0 0 if (defined $conv)
3716 0 0 if (ref $conv eq 'CODE') { }
0 0 elsif (not ref $conv) { }
3721 0 0 if $@
3723 0 0 if ($Image::ExifTool::evalWarning)
3728 0 0 unless (defined $val and &IsFloat($val))
3737 0 13 if ($err)
3743 0 13 unless defined $checkVal
3745 0 13 if $val eq $nvHash->{'Value'}[0]
3751 10 22 if $val eq $delVal
3772 5674 28973 unless $writeGroup =~ /^(MakerNotes|XMP|Composite|QuickTime)$/
3784 3 2 $wantGroup ? :
3786 0 5 if $grps{'exif'} and not $grps{'gps'}
3802 2 2 if $tagGroups{$grp}
3805 4 1 unless ($writeGPS)
3806 0 4 if $grps{'keys'}
3807 3 1 if ($grps{'xmp'} or not @tags || $grps{'quicktime'})
3811 1 4 unless defined $writeGPS
3812 0 2 if $writeGPS and $grps{'keys'}
3815 1 1 if ($grps{'quicktime'} and not $didQT or $writeGPS and not @tags and not $grps{'xmp'})
3819 2 3 if ($writeGPS)
3820 0 2 if $grps{'xmp'} and not $grps{'xmp-exif'}
3821 1 1 unless $wantGroup
3837 4 69879 unless $tagInfo
3841 42929 26950 if $opts
3842 22529 47350 unless defined $writeGroup
3844 47350 22529 if ($writeGroup)
3848 36 1971 if $nvHash->{'WriteGroup'} =~ /^(QuickTime|All)$/
3852 3 1968 if $writeGroup eq "All" or $nvHash->{'WriteGroup'} eq "EXIF" and $writeGroup =~ /IFD/
3858 2402 603 if (defined $nvHash and $opts{'delete'} || $opts{'create'} && $nvHash->{'Save'})
3865 0 2402 if ($protect and not $opts{'create'} && ($nvHash->{'NoReplace'} || $_[5] || $nvHash->{'DelValue'} && !defined($nvHash->{'Shift'}))) { }
2392 10 elsif ($opts{'delete'}) { }
3878 75 10 unless ref $copy{$key} eq "ARRAY"
3886 0 0 if $protect and $nvHash->{'Value'}
3889 23871 24153 if (not defined $nvHash and $opts{'create'})
3898 36 23835 if ($self->{'NEW_VALUE'}{$tagInfo}) { }
3913 0 0 if $loadedAllTables
3919 0 0 unless $table =~ /:/
3932 0 0 if ($writeProc)
3941 0 0 unless my $subdir = $tagInfo->{'SubDirectory'}
3942 0 0 unless my $tableName = $subdir->{'TagTable'}
3944 0 0 if $Image::ExifTool::allTables{$tableName} or $pushedTables{$tableName}
3960 2665 0 if ($nvHash eq $firstHash) { }
3962 0 2665 if ($nvHash->{'Next'}) { }
3974 79 2586 if ($nvHash->{'Save'})
3989 944 11 unless $self->{'NEW_VALUE'}
3993 3 8 if $removeGroups{$group}
3996 0 11 if $self->{'OPTIONS'}{'Verbose'} > 1
4009 1592 422 if $wgrp eq $grp0
4010 273 1741 if ($grp0 eq "*" or $wgrp eq "*" or grep /^($grp0|$wgrp)$/i, @groups)
4011 0 273 if $out
4015 2008 6 unless $nvHash = $nextHash
4029 1236 21 if ($nv)
4033 58296 33492 if $tagTablePtr and $tagTablePtr ne $tagInfo->{'Table'}
4054 21967 314 if $tagTablePtr and $tagTablePtr ne $tagInfo->{'Table'}
4070 32 484 unless $parent
4080 181295 38658 unless $tagInfo->{'SubDirectory'}
4085 4262 34396 unless ($dirName)
4091 287 38371 if ($editDirs->{$dirName} and $editDirs->{$dirName} eq $parent)
4093 151 136 if $addDirs->{$dirName}
4097 78 438 if wantarray
4113 192 143 unless ($langInfo)
4143 203 129 unless ($fileDirs)
4144 118 85 unless ref $fileType eq "HASH"
4158 3598 9714 if ($preferredGroup)
4160 803 2795 if ($isCreating) { }
4165 142 1 if $preferredGroup ne $g0 and $nvHash->{'CreateGroups'}{$preferredGroup} and !$altGroup || $altGroup ne $g0
4171 92 0 if $nvHash->{'Value'} and $preferredGroup eq $g0 and not $nvHash->{'EditOnly'} and $self->{'OPTIONS'}{'WriteMode'} =~ /g/
4178 394 12918 if ($dirName =~ /^MIE\d*(-[a-z]+)?\d*$/i)
4183 0 13312 if ($dirName eq '*' and $nvHash->{'Value'}) { }
46 13266 elsif ($dirName eq 'QuickTime') { }
4185 0 0 if ($val)
4187 0 0 unless $val =~ /\b($_|All)\b/i
4189 0 0 if $_ eq "FixBase"
4200 6463 47278 if (ref $parent)
4205 5067 48674 if $isCreating and $isCreating != 2
4210 39 175 if (%{$self->{'DEL_GROUP'};})
4213 2 1034 if /^-/
4216 78 956 if $translateWriteGroup{$dirName}
4218 41 993 if $dirName =~ /^XMP-/
4222 17 1467 if (ref $parent)
4232 88 38 if ($editDirs->{'IFD0'} and $fileDirs->{'JFIF'})
4237 2 212 if ($self->{'OPTIONS'}{'Verbose'})
4242 0 2 unless $self->{'OPTIONS'}{'Verbose'} > 1
4259 0 1947 unless $tagTablePtr
4260 4 1943 if $self->{'OPTIONS'}{'Verbose'}
4266 594 1353 unless $dirName
4267 287 1660 if (%{$self->{'DEL_GROUP'};})
4272 186 101 if ($permanentDir{$grp0} and not $dirInfo->{'TagInfo'} && $dirInfo->{'TagInfo'}{'Deletable'})
4275 42 245 if ($delFlag)
4276 0 42 if ($dirInfo->{'Permanent'}) { }
0 42 elsif ($grp0 =~ /^(MakerNotes)$/ || $grp1 =~ /^(IFD0|ExifIFD|MakerNotes)$/ and $self->IsRawType and !($dirInfo->{'TagInfo'} && defined $dirInfo->{'TagInfo'}{'Permanent'}) || $dirInfo->{'TagInfo'}{'Permanent'} and not $self->IsRawType == 2 && $parent eq 'ExifIFD') { }
10 32 elsif (not $blockExifTypes{$self->{'FILE_TYPE'}}) { }
4292 0 10 if ($self->{'FILE_TYPE'} eq 'PSD') { }
0 10 elsif ($self->{'FILE_TYPE'} =~ /^(EPS|PS)$/) { }
0 10 elsif ($grp1 eq 'IFD0') { }
0 10 elsif ($grp0 eq 'EXIF' and $delGroup->{$grp0}) { }
4294 0 0 if $grp0 eq "Photoshop"
4299 0 0 if $delGroup->{'IFD0'}
4302 0 0 unless $delGroup->{$grp1} or $grp1 eq "ExifIFD"
4305 42 0 if ($grp1)
4306 32 10 if ($dataPt or $dirInfo->{'RAF'})
4308 1 31 if $out
4309 3 29 if $grp1 eq "ICC_Profile"
4311 6 26 if $dirName =~ /IFD/
4317 1 41 if not $right and $grp1 eq "EXIF"
4318 21 21 if ($delFlag == 2 and $right) { }
4321 21 0 if (not $parent or $parent eq $right or $parent eq $right2) { }
4324 9 12 unless $self->{'Recreated'}
4325 0 21 if ($self->{'Recreated'}{$path})
4326 0 0 $parent ? :
4345 20 1 unless $dirInfo->{'NoDelete'}
4351 293 1634 unless $writeProc or $writeProc = $tagTablePtr->{'WRITE_PROC'}
4358 206 1428 if $blockName eq "IFD0"
4364 1 10 if ($blockName eq "EXIF")
4365 0 1 unless ($blockExifTypes{$self->{'FILE_TYPE'}})
4373 0 1 unless $writeProc eq \&Image::ExifTool::WriteTIFF
4375 4 7 $dataPt ? :
0 11 unless $self->IsOverwriting($nvHash, $dataPt ? $$dataPt : "")
4378 11 0 if (defined $newVal and length $newVal) { }
4380 0 11 if ($tagInfo->{'Name'} eq "MakerNoteCanon")
4382 0 0 if ($tagInfo eq $Image::ExifTool::Canon::uuid{'CMT3'})
4384 0 0 if (substr($newVal, 0, 1) eq "\000") { }
4393 0 0 unless $dataPt or $dirInfo->{'RAF'}
4395 0 0 if ($blockName eq "MakerNotes" and $self->IsRawType and not $self->IsRawType == 2 && $parent eq 'ExifIFD')
4406 0 11 if $out
4411 693 693 if (defined $dataPt and defined $dirInfo->{'DirStart'} and defined $dirInfo->{'DataPos'} and not $dirInfo->{'NoRefTest'})
4416 0 693 if ($self->{'PROCESSED'}{$addr} and $dirName ne 'ICC_Profile' || $self->{'TIFF_TYPE'} ne 'IIQ') { }
4417 0 0 if (defined $dirInfo->{'DirLen'} and not $dirInfo->{'DirLen'} and $dirName ne $self->{'PROCESSED'}{$addr}) { }
0 0 elsif ($self->Error("$dirName pointer references previous $self->{'PROCESSED'}{$addr} directory", 2)) { }
4424 0 0 if $out
4437 4 1619 if ($out)
4439 0 4 $dirName eq 'MakerNotes' && $dirInfo->{'TagInfo'} ? :
4440 3 1 if (not defined $oldDir or $oldDir ne $name)
4441 1 2 $isRewriting ? :
4457 59 1564 unless defined $newData and length $newData || $isRewriting
4461 4 1619 if ($out)
4462 0 4 if defined $newData and not length $newData
4463 0 4 if ($self->{'CHANGED'} == $oldChanged and $self->{'OPTIONS'}{'Verbose'} > 2)
4476 12 0 &GetByteOrder() eq 'MM' ? :
4484 83 114 &GetByteOrder() eq 'MM' ? :
4494 0 0 $val > 0 ? :
4501 1 0 &GetByteOrder() eq 'MM' ? :
4504 0 1 $exp & 32768 ? :
4534 0 169 if defined $opts{'Len'}
4536 70 99 unless defined $addr
4537 4 165 unless defined $len
4538 5 164 if ($maxLen and $len > $maxLen)
4544 0 169 if ($len > $datLen)
4553 159 69 if $wid > $len - $i
4561 5 164 if $more
4589 578 39 if (defined $tagID) { }
4590 563 15 if $tagID =~ /^\d+$/
4595 617 0 if ($tagInfo and $tagInfo->{'Name'}) { }
0 0 elsif ($parms{'Name'}) { }
4602 0 0 if $parms{'Table'}
4603 0 0 if ($prefix or $hexID) { }
4604 0 0 unless $prefix
4605 0 0 $hexID ? :
4612 0 617 unless defined $size or not $dataPt
4618 365 252 if (defined $index)
4620 172 193 if length $index < 2
4624 39 578 if ($tagInfo and $tagInfo->{'SubDirectory'}) { }
4629 578 0 if (defined $val) { }
0 0 elsif ($dataPt) { }
4630 0 578 if ref $val eq "ARRAY"
4640 0 40 if ($verbose > 1 and $parms{'Extra'} || $parms{'Format'} || $parms{'DataPt'} || defined $size || $tagID =~ m[/])
4644 389 1 if ($hexID) { }
4650 0 390 if defined $parms{'Extra'}
4652 390 0 if ($format or defined $size)
4654 390 0 if (defined $size)
4656 352 38 if $format
4658 352 38 if ($format)
4660 352 0 if $parms{'Count'}
4664 165 0 if $verbose > 2 and $parms{'DataPt'}
4669 165 18 if ($verbose > 2 and $parms{'DataPt'} and not $tagInfo && $tagInfo->{'ReadFromRAF'})
4673 165 0 $verbose == 3 ? :
165 0 if $verbose < 5
4693 0 1 unless defined $pos
4697 0 1 unless ($size)
4698 0 0 unless $raf->Seek(0, 2)
4700 0 0 unless $size
4702 0 1 unless $raf->Seek($pos, 0)
4703 0 1 if ($htmlDump)
4704 0 0 unless my $num = $raf->Read($buff, $size)
4706 0 0 if $trailer eq "Unknown"
4712 1 0 unless $verbose > 2
4715 0 0 if ($verbose < 5)
4716 0 0 $verbose < 4 ? :
4717 0 0 if $num > $limit
4719 0 0 unless $raf->Read($buff, $num) == $num
4721 0 0 if ($size > 2 * $num) { }
0 0 elsif ($size > $num) { }
4731 0 0 if (defined $buf2)
4759 0 0 if ($hidPos and $hidLen)
4763 0 0 if $datPt
4767 0 0 if $prePos and $preLen and $prePos + $preLen > $pos
4768 0 0 if $lastOne
4772 0 0 if (defined $prePos) { }
4784 0 0 if ($pos < $prePos)
4792 0 0 unless $preLen
4794 0 0 if ($self->{'OPTIONS'}{'Verbose'})
4823 1078 11 unless $_[0]{'OPTIONS'}{'Verbose'} > 1
4826 9 2 unless $xtra
4841 0 0 if $ch < 128
4844 0 0 if $ch < 32
4847 0 0 if $ch < 16
4865 0 0 if ($_[0] =~ /([\x80-\xff])/g) { }
4873 0 0 if $len
4874 0 0 unless defined $ch
4879 0 0 if ($ch < 194 or $ch >= 248)
4886 0 0 if ($ch < 224) { }
0 0 elsif ($ch < 240) { }
4895 0 0 unless ($_[0] =~ /\G([\x80-\xbf]{$n})/g)
4918 15 46 unless defined $guidCount and ++$guidCount < 256
4933 0 0 unless $res
4936 0 0 if (not $cmap) { }
0 0 elsif (length $cmap == 3 * 2 ** $bits) { }
0 0 elsif (length $cmap != 6 * 2 ** $bits) { }
4944 0 0 $cmap ? :
4945 0 0 $cols == 1 ? :
0 0 $cols == 1 ? :
0 0 $cmap ? :
0 0 $cmap ? :
4986 0 61 unless ref $self
4987 0 61 if ($self->{'Now'}) { }
4998 61 0 if $tzFlag or not defined $tzFlag
5018 6 468 if (not $fmt and $val =~ s/([-+])(\d{1,2}):?(\d{2})\s*(DST)?$//i) { }
0 468 elsif (not $fmt and $val =~ s/Z$//i) { }
5025 0 468 if lc $val eq "now"
5028 1 473 if ($fmt)
5029 1 0 unless (defined $strptimeLib)
5030 1 0 if (eval { do { require POSIX::strptime } }) { }
0 0 elsif (eval { do { require Time::Piece } }) { }
5043 1 0 if ($fmt =~ /%(f|:?z)/)
5044 1 0 if ($fmt =~ s/(.*[^%])%f/$1/)
5045 1 0 if $val =~ s/(.*)(\.\d+)/$1/
5047 1 0 if ($fmt =~ s/(.*[^%])%(:?)z/$1/)
5049 1 0 if $val =~ s/(.*)([-+]\d{2})$colon(\d{2})/$1/
5055 0 1 if ($fmt eq "%s")
5059 0 1 if (not $lib) { }
1 0 elsif ($lib eq 'POSIX::strptime') { }
5060 0 0 unless $self->{'OPTIONS'}{'StrictDate'}
5067 0 0 if ($^O eq "MSWin32" and $fmt =~ /%s/ and $val =~ /-\d/)
5076 1 0 if (defined $a[5] and length $a[5]) { }
5082 1 0 if defined $a[4] and length $a[4]
5085 0 5 if (not defined $a[$i] && length $a[$i]) { }
3 2 elsif (length $a[$i] < 2) { }
5086 0 0 if ($i < 2 or $dateOnly) { }
5100 465 9 if ($val =~ /(\d{4})/g)
5104 439 26 if (@a >= 3) { }
26 0 elsif ($dateOnly) { }
5108 438 1 unless ($fmt)
5109 5 433 @a > 5 && $val =~ /(\.\d+)\s*$/ ? :
5112 34 405 if ($tzFlag) { }
92 313 elsif (defined $tzFlag) { }
5113 34 0 unless ($tz)
5114 34 0 if (eval { do { require Time::Local } }) { }
5126 438 1 if (defined $ss and $ss < 60) { }
1 0 elsif ($dateOnly) { }
5134 0 439 if ($a[0] < 1 or $a[0] > 12)
5138 0 439 if ($a[1] < 1 or $a[1] > 31)
5142 0 439 if $a[2] > 24
5143 0 439 if $a[3] > 59
5149 9 465 unless $rtnVal
5169 0 46 unless (&SetByteOrder($byteOrder))
5170 0 0 if $self->Options("Verbose")
5184 1475 3523 if @_ < 3
5203 0 634 if $val eq "inf"
5204 0 634 if $val eq "undef"
5205 16 618 if $val =~ m[^([-+]?\d+)/(\d+)$]
5207 39 579 if $val == 0
5208 12 567 $val < 0 ? :
5214 0 1475 if ($n > $maxInt or $d > $maxInt)
5215 0 0 if defined $num
5216 0 0 if $val < 1
5221 579 896 if abs $err < "1e-08"
5224 0 896 unless $frac -= $int
5237 10 178 if $val < 0
5243 12 58 if $val < 0
5252 27 1 &GetByteOrder() eq 'MM' ? :
5253 27 1 if $_[1]
5259 0 0 if $val < 0
5265 0 319 if $_[1]
5271 0 45 if $_[1]
5277 0 0 if $_[1]
5283 0 0 if $_[1]
5292 0 0 $val < 0 ? :
5300 2 10 $val < 0 ? :
5304 0 64 if $_[1]
5310 0 66 if $_[1]
5370 1065 341 if ($proc) { }
341 0 elsif ($format eq 'string' or $format eq 'undef') { }
5372 571 494 if ($count) { }
5373 64 507 if $count < 0
5380 0 1570 unless defined $val
5382 1189 381 if ($format =~ /^int/) { }
7 374 elsif (not &IsFloat($val)) { }
5383 0 1189 unless (&IsInt($val) or &IsHex($val))
5384 0 0 unless &IsFloat($val)
5386 0 0 $val < 0 ? :
5390 0 7 unless $format =~ /^rational/ and $val eq 'inf' || $val eq 'undef' || &IsRational($val)
5396 191 150 if $format eq "string"
5397 61 280 if ($count and $count > 0) { }
5399 33 28 if ($diff)
5402 26 7 if ($diff < 0) { }
5403 26 0 if ($format eq 'string') { }
5404 0 26 unless $count
5416 2 339 if $dataPt
5422 215 850 if $dataPt
5434 103 2 unless $bits
5435 103 2 unless $num
5438 86 19 if ($val ne "(none)")
5442 42 0 if ($lookup) { }
5445 33 9 unless (defined $bit)
5446 0 33 if ($val =~ /\[(\d+)\]/) { }
5450 31 2 unless @vals > 1 and wantarray
5457 0 9 unless (&IsInt($bit) and $bit < $num)
5458 0 0 unless wantarray
5459 0 0 &IsInt($bit) ? :
5475 305 29 if (UNIVERSAL::isa($outfile, 'GLOB')) { }
5489 2355 1730 if (UNIVERSAL::isa($outfile, 'GLOB')) { }
1730 0 elsif (ref $outfile eq 'SCALAR') { }
5505 0 12 if ($self->{'DEL_GROUP'}{'Trailer'})
5513 8 4 if ($trailInfo->{'Fixup'})
5514 8 0 if ($pos > 0) { }
5535 2 131 if ref $types[0]
5536 131 2 unless $types[0]
5538 126 7 unless @types
5542 249 10 unless $self->{'NEW_VALUE'}{$Image::ExifTool::Extra{$type}}
5543 1 9 if $$self{"Did$type"}
5544 1 8 unless my $val = $self->GetNewValue($type)
5546 3 5 if ($type eq "CanonDR4")
5547 1 2 if $self->{'DidCanonVRD'}
5552 0 7 $trailPt ? :
5554 0 7 if ($trailPt) { }
5574 34 80 unless $type
5579 3 111 if $type eq "ICC"
5587 0 114 if ($size > $maxLen)
5591 0 0 if $type eq "EXIF" and $n + $maxLen <= $len - 4 and substr($$dataPt, $n + $maxLen, 4) =~ /^(MM\0\x2a|II\x2a\0)/
5597 3 111 if ($type eq "ICC")
5603 0 114 unless &Write($outfile, $segHdr, $header, $buff)
5604 114 0 if $n >= $len
5621 0 36 if ($size > $maxXMPLen)
5626 0 36 unless &Write($outfile, $app1hdr, $Image::ExifTool::xmpAPP1hdr, $$dataPt)
5628 0 36 if (defined $guid)
5635 0 0 if $len > $maxLen
5638 0 0 unless &Write($outfile, $app1hdr, $Image::ExifTool::xmpExtAPP1hdr, $guid, pack("N2", $size, $off), substr($$extPt, $off, $len))
5662 2 112 unless ($raf->Read($s, 2) == 2 and $s eq "\377\330")
5663 1 1 if (defined $s and length $s) { }
5664 0 1 unless $s eq "\377\1" and $raf->Read($s, 5) == 5 and $s eq "Exiv2"
5666 0 1 unless $self->{'FILE_TYPE'} eq "EXV"
5670 0 2 unless &Write($outfile, "\377\1")
5677 0 114 unless &Write($outfile, $s)
5694 1 807 unless $raf->ReadLine($s)
5697 0 807 unless $raf->Read($ch, 1)
5699 807 0 unless $marker == 255
5703 113 694 if ($marker == 218 or $marker == 217)
5710 112 582 if (($marker & 240) == 192 and $marker == 192 || $marker & 3) { }
582 0 elsif ($marker != 0 and $marker != 1 and $marker < 208 || $marker > 215) { }
5711 0 112 unless $raf->Seek(7, 1)
5716 0 582 unless $raf->Read($s, 2) == 2
5718 0 582 unless defined $len and $len >= 2
5720 347 235 if (($marker & 240) == 224)
5721 88 259 $len < 64 ? :
5722 0 347 unless $raf->Read($s, $n) == $n
5726 45 302 if ($marker == 224) { }
84 218 elsif ($marker == 225) { }
55 163 elsif ($marker == 226) { }
9 154 elsif ($marker == 227) { }
9 145 elsif ($marker == 229) { }
9 136 elsif ($marker == 234) { }
18 118 elsif ($marker == 235) { }
19 99 elsif ($marker == 236) { }
29 70 elsif ($marker == 237) { }
16 54 elsif ($marker == 238) { }
5727 18 27 if $s =~ /^JFIF\0/
5728 9 36 if $s =~ /^JFXX\0\x10/
5729 9 36 if $s =~ /^(II|MM).{4}HEAPJPGM/s
5731 60 24 if ($s =~ /^(.{0,4})Exif\0.(.{1,4})/is)
5735 0 0 if (@dirOrder and $dirOrder[-1] =~ /^(IFD0|ExtendedEXIF)$/ and not length $junk and not $bytes =~ /^(MM\0\x2a|II\x2a\0)/)
5741 22 62 if $s =~ /^$Image::ExifTool::xmpAPP1hdr/
5742 2 82 if $s =~ /^$Image::ExifTool::xmpExtAPP1hdr/
5744 14 41 if $s =~ /^ICC_PROFILE\0/
5745 32 23 if $s =~ /^FPXR\0/
5746 9 46 if $s =~ /^MPF\0/
5748 9 0 if $s =~ /^(Meta|META|Exif)\0\0/
5750 9 0 if $s =~ /^RMETA\0/
5752 0 9 if $s =~ /^AROT\0\0/
5754 9 9 if $s =~ /^JP/
5756 10 9 if $s =~ /^Ducky/
5758 20 9 if $s =~ /^$Image::ExifTool::psAPP13hdr/
5760 16 0 if $s =~ /^Adobe/
5764 216 131 if defined $dirName and not $delGroup->{$dirName}
5766 0 582 unless $raf->Seek($len, 1)
5768 446 248 unless $dirName
5772 2 112 unless ($marker and $marker == 218)
5773 0 2 unless $isEXV
5774 0 2 if $marker and $marker != 217
5776 0 114 unless $raf->Seek($pos, 0)
5787 1 807 unless $raf->ReadLine($segJunk)
5791 112 696 if length $segJunk
5794 807 1 if ($raf->Read($ch, 1)) { }
1 0 elsif ($creatingEXV) { }
5796 807 0 unless $marker == 255
5811 112 696 if (($marker & 240) == 192 and $marker == 192 || $marker & 3) { }
694 2 elsif ($marker != 0 and $marker != 1 and $marker != 217 and $marker < 208 || $marker > 215) { }
5812 0 112 unless $raf->Read($segData, 7) == 7
5819 0 694 unless $raf->Read($s, 2) == 2
5821 0 694 unless defined $len and $len >= 2
5824 0 694 unless $raf->Read($segData, $len) == $len
5835 1 807 if (exists $addDirs->{'JFIF'} and not defined $doneDir{'JFIF'})
5837 1 0 if (defined $doneDir{'Adobe'}) { }
5842 0 0 if ($verbose)
5861 0 0 if defined $delJFIF
5862 0 0 if (defined $newData and length $newData)
5864 0 0 unless &Write($outfile, $app0hdr, "JFIF\0", $newData)
5869 60 703 if $markerName eq "APP0" or $dirCount{'IFD0'} or $dirCount{'ExtendedEXIF'}
5871 33 670 if (exists $addDirs->{'IFD0'} and not defined $doneDir{'IFD0'})
5873 1 32 if $verbose
5883 31 2 if (defined $buff and length $buff)
5884 0 31 if (length($buff) + length($Image::ExifTool::exifAPP1hdr) > $maxSegmentLen)
5885 0 0 if ($self->Options('NoMultiExif')) { }
5892 0 31 if ($self->{'PREVIEW_INFO'} || $self->{'LeicaTrailer'} || $self->{'HiddenData'} and not $oldOutfile)
5900 0 0 if $self->{$_}
5905 0 31 if (not $n) { }
0 62 elsif ($n > 1 and $oldOutfile) { }
5915 182 521 if $dirCount{'Photoshop'}
5916 21 500 if (exists $addDirs->{'Photoshop'} and not defined $doneDir{'Photoshop'})
5918 0 21 if $verbose
5926 21 0 if (defined $buff and length $buff)
5927 0 21 unless &WriteMultiSegment($outfile, 237, $Image::ExifTool::psAPP13hdr, \$buff)
5932 15 506 if $dirCount{'XMP'}
5933 29 477 if (exists $addDirs->{'XMP'} and not defined $doneDir{'XMP'})
5935 0 29 if $verbose
5945 29 0 if (defined $buff and length $buff)
5947 0 29 unless &WriteMultiXMP($self, $outfile, \$buff, $dirInfo{'ExtendedXMP'}, $dirInfo{'ExtendedGUID'})
5951 5 501 if $dirCount{'ICC_Profile'}
5952 3 498 if (exists $addDirs->{'ICC_Profile'} and not defined $doneDir{'ICC_Profile'})
5954 0 3 if $delGroup->{'ICC_Profile'} and $delGroup->{'ICC_Profile'} != 2
5955 0 3 if $verbose
5963 3 0 if (defined $buff and length $buff)
5964 0 3 unless &WriteMultiSegment($outfile, 226, "ICC_PROFILE\0", \$buff, "ICC")
5969 1 500 if $dirCount{'Ducky'}
5970 2 498 if (exists $addDirs->{'Ducky'} and not defined $doneDir{'Ducky'})
5972 0 2 if $verbose
5980 2 0 if (defined $buff and length $buff)
5982 2 0 if ($size <= $maxSegmentLen) { }
5985 0 2 unless &Write($outfile, $app12hdr, "Ducky", $buff)
5992 25 475 if $dirCount{'Adobe'}
5993 0 475 if (exists $addDirs->{'Adobe'} and not defined $doneDir{'Adobe'})
5996 0 0 if ($buff)
5997 0 0 if $verbose
5999 0 0 if ($size <= $maxSegmentLen) { }
6002 0 0 unless &Write($outfile, $app14hdr, $buff)
6010 20 455 if $dirCount{'COM'}
6011 5 450 if (exists $addDirs->{'COM'} and not defined $doneDir{'COM'})
6013 0 5 if $delGroup->{'File'} and $delGroup->{'File'} != 2
6015 5 0 if (defined $newComment)
6016 0 5 if ($verbose)
6020 0 5 unless &WriteMultiSegment($outfile, 254, "", \$newComment)
6033 112 696 if (($marker & 240) == 192 and $marker == 192 || $marker & 3) { }
112 584 elsif ($marker == 218) { }
2 582 elsif ($marker == 217 and $isEXV) { }
0 694 elsif ($marker == 0 or $marker == 1 or $marker >= 208 and $marker <= 215) { }
6034 1 111 if $verbose
6035 0 112 unless &Write($outfile, $hdr, $segData)
6039 1 111 if $verbose
6042 0 112 unless &Write($outfile, $hdr, $s, $segData)
6045 108 4 unless $delGroup->{'Trailer'}
6047 97 0 unless ($oldOutfile or $delPreview or $trailInfo or $delGroup->{'Trailer'} or $nvTrail or $self->{'HiddenData'})
6052 0 97 unless &Write($outfile, $buff)
6060 0 15 unless my $n = $raf->Read($buff, 65536)
6061 15 0 if ($endedWithFF and $buff =~ /^\xd9/gs or $buff =~ /\xff\xd9/gs)
6067 0 15 unless &Write($outfile, substr($buff, 0, $pos))
6071 0 0 unless ($n == 65536)
6075 0 0 unless &Write($outfile, $buff)
6076 0 0 substr($buff, 65535, 1) eq "\377" ? :
6081 0 15 if ($nvTrail)
6083 0 0 if ($nvTrail->{'Value'} and $nvTrail->{'Value'}[0]) { }
0 0 elsif ($raf->Seek(0, 2) and $raf->Tell != $endPos) { }
6085 0 0 unless &Write($outfile, $nvTrail->{'Value'}[0])
6094 11 4 if ($trailInfo)
6099 0 11 unless $self->ProcessTrailers($trailInfo)
6101 0 15 if ($oldOutfile)
6104 0 0 if ($self->{'HiddenData'})
6111 0 0 if ($dataPt) { }
6114 0 0 unless ($padLen >= 0 and $raf->Seek($endPos, 0) and $raf->Read($pad, $padLen) == $padLen)
6127 0 0 if ($self->{'LeicaTrailer'})
6129 0 0 if ($trailInfo) { }
6132 0 0 unless $raf->Seek(0, 2)
6147 0 0 defined $dat ? :
6149 0 0 if defined $trailSize
6151 0 0 if (defined $dat)
6152 0 0 unless &Write($outfile, $dat)
6157 0 0 if ($self->{'PREVIEW_INFO'})
6159 0 0 $self->{'Make'} =~ /^SONY/i ? :
6160 0 0 if (length $buff < $scanLen)
6162 0 0 if $raf->Read($buf2, $scanLen - length($buff))
6168 0 0 if ($buff =~ /(\xff\xd8\xff.|.\xd8\xff\xdb)(..)/gs)
6172 0 0 if ($self->{'Make'} =~ /^SONY/i and $junkLen > 32)
6175 0 0 if ($jpegHdr eq "\377\330\377\341")
6179 0 0 if (length $buff > $junkLen + $segLen + 6 and substr($buff, $junkLen + $segLen + 3, 3) eq "\330\377\333")
6197 0 0 if $previewInfo->{'Absolute'}
6198 0 0 if ($previewInfo->{'Relative'}) { }
0 0 elsif ($previewInfo->{'ChangeBase'}) { }
6204 0 0 if $makerOffset
6207 0 0 if ($previewInfo->{'Data'} ne "LOAD_PREVIEW")
6209 0 0 if $junkLen
6215 0 0 unless &Write($outfile, $writeBuffer)
6218 0 0 if ($previewInfo and $previewInfo->{'Data'} ne "LOAD_PREVIEW")
6220 0 0 if defined $previewInfo->{'Junk'}
6222 0 0 unless &Write($outfile, $previewInfo->{'Data'})
6229 15 0 unless ($delPreview)
6231 11 4 if ($trailInfo) { }
6233 11 0 defined $trailInfo->{'DataPos'} ? :
6236 0 4 unless $raf->Seek(0, 2)
6239 3 12 if ($extra > 0)
6240 2 1 if ($delGroup->{'Trailer'}) { }
6241 0 2 if $verbose
6245 0 1 if $verbose
6246 0 1 unless $raf->Seek($endPos, 0)
6247 0 1 unless &CopyBlock($raf, $outfile, $extra)
6252 11 4 if ($trailInfo)
6253 0 11 unless $self->WriteTrailerBuffer($trailInfo, $outfile)
6260 0 2 unless &Write($outfile, "\377\331")
6265 0 0 if $verbose and $marker
6267 0 0 unless &Write($outfile, $hdr)
6277 2 580 if $verbose
6279 55 527 if ($delGroup->{$dirName})
6280 0 55 if $verbose
6281 4 51 if $dirName eq "ICC_Profile"
6289 31 100 if ($marker == 224) { }
73 27 elsif ($marker == 225) { }
0 27 elsif ($marker == 226) { }
1 26 elsif ($marker == 227) { }
0 26 elsif ($marker == 229) { }
0 26 elsif ($marker == 232 or $marker == 233) { }
0 26 elsif ($marker == 234) { }
0 26 elsif ($marker == 235) { }
1 25 elsif ($marker == 236) { }
9 16 elsif ($marker == 237) { }
4 12 elsif ($marker == 238) { }
4 8 elsif ($marker == 254) { }
6290 11 20 if ($$segDataPt =~ /^JFIF\0/) { }
8 12 elsif ($$segDataPt =~ /^JFXX\0\x10/) { }
6 6 elsif ($$segDataPt =~ /^(II|MM).{4}HEAPJPGM/s) { }
6292 0 11 if $delGroup->{'JFIF'}
6293 0 11 unless $editDirs->{'JFIF'}
6305 11 0 if (defined $newData and length $newData)
6310 2 6 if $delGroup->{'JFIF'}
6313 0 6 if $delGroup->{'CIFF'}
6314 2 4 unless $editDirs->{'CIFF'}
6321 4 0 if (Image::ExifTool::CanonRaw::WriteCRW($self, \%dirInfo) > 0)
6322 4 0 if (length $newData) { }
6332 52 21 if ($$segDataPt =~ /^(.{0,4})Exif\0./is) { }
21 0 elsif ($$segDataPt =~ /^($Image::ExifTool::xmpAPP1hdr|$Image::ExifTool::xmpExtAPP1hdr)/) { }
0 0 elsif ($$segDataPt =~ /^http/ or $$segDataPt =~ /
6334 0 52 if (length $1) { }
0 52 elsif (not $$segDataPt =~ /^Exif\0/) { }
6341 1 51 unless $editDirs->{'IFD0'}
6343 0 51 if (defined $combinedSegData)
6350 0 51 if ($dirOrder[0] eq "ExtendedEXIF")
6352 0 0 unless (defined $combinedSegData)
6359 0 51 if $doneDir{'IFD0'}
6362 1 50 if ($delGroup->{'IFD0'} or $delGroup->{'EXIF'})
6379 50 0 if (defined $buff) { }
6383 0 0 unless $self->Options("IgnoreMinorErrors")
6386 4 46 unless length $$segDataPt
6387 0 46 if (length($$segDataPt) + length($Image::ExifTool::exifAPP1hdr) > $maxSegmentLen)
6388 0 0 if ($self->Options('NoMultiExif')) { }
6395 0 46 if ($self->{'PREVIEW_INFO'} || $self->{'LeicaTrailer'} || $self->{'HiddenData'} and not $oldOutfile)
6403 0 0 if $self->{$_}
6408 0 46 if (not $n) { }
0 92 elsif ($n > 1 and $oldOutfile) { }
6420 0 21 if $delGroup->{'XMP'}
6422 7 14 unless $editDirs->{'XMP'}
6423 3 11 if ($doneDir{'XMP'} + $dirCount{'XMP'} > 1)
6426 2 1 if ($$segDataPt =~ /^$Image::ExifTool::xmpExtAPP1hdr/) { }
6428 0 2 if (length $$segDataPt < 75) { }
6433 0 2 if ($guid =~ /[^A-Za-z0-9]/) { }
6438 1 1 if ($extXMP) { }
6439 0 1 unless $size == $extXMP->{'Size'}
6449 1 0 unless $extendedXMP{'Main'}
6453 2 1 if $dirCount{'XMP'}
6459 1 0 if (/:HasExtendedXMP\s*(=\s*['"]|>)(\w{32})/)
6462 0 1 if ($goodGuid and $goodGuid ne $2)
6471 1 0 if $readGuid eq 1
6473 1 1 unless length $guid == 32
6474 0 1 if ($guid ne $readGuid and $readGuid ne 2)
6475 0 0 $guid eq $goodGuid ? :
6479 0 1 if ($guid ne $goodGuid)
6483 0 1 unless ref $extXMP eq "HASH"
6487 0 2 unless defined $extXMP->{$off}
6491 1 0 if ($off == $size) { }
6498 0 1 if $extendedXMP{'Error'}
6510 9 3 if (defined $newData) { }
6512 7 2 if (length $newData) { }
6515 0 7 unless &WriteMultiXMP($self, $outfile, \$newData, $dirInfo{'ExtendedXMP'}, $dirInfo{'ExtendedGUID'})
6522 0 3 if $verbose
6523 0 3 if ($doneDir{'XMP'} > 1)
6527 0 0 unless length $dat
6529 0 0 unless &Write($outfile, $hdr, $s, $Image::ExifTool::xmpAPP1hdr, $dat)
6532 0 0 unless length $guid == 32
6534 0 0 unless ref $extXMP eq "HASH"
6535 0 0 unless my $size = $extXMP->{'Size'}
6539 0 0 unless &Write($outfile, $hdr, $s, $Image::ExifTool::xmpExtAPP1hdr, $guid, pack("N2", $size, $off), $extXMP->{$off})
6548 2 3 unless length $$segDataPt
6553 0 0 if ($$segDataPt =~ /^ICC_PROFILE\0/ and $length >= 14) { }
0 0 elsif ($$segDataPt =~ /^FPXR\0/) { }
0 0 elsif ($$segDataPt =~ /^MPF\0/) { }
6555 0 0 if $delGroup->{'ICC_Profile'}
6559 0 0 if (defined $iccChunksTotal) { }
6561 0 0 if ($chunksTot != $iccChunksTotal and defined $iccChunkCount)
6571 0 0 unless $chunksTot
6573 0 0 if (defined $iccChunkCount) { }
0 0 elsif (defined $chunkNum) { }
6575 0 0 if (defined $iccChunk[$chunkNum]) { }
6582 0 0 unless ++$iccChunkCount >= $iccChunksTotal
6601 0 0 if (defined $newData)
6605 0 0 unless length $$segDataPt
6607 0 0 unless &WriteMultiSegment($outfile, $marker, "ICC_PROFILE\0", $segDataPt, "ICC")
6616 0 0 if $delGroup->{'FlashPix'}
6619 0 0 if $delGroup->{'MPF'}
6622 1 0 if ($$segDataPt =~ /^(Meta|META|Exif)\0\0/)
6624 0 1 if $delGroup->{'Meta'}
6625 0 1 if $doneDir{'Meta'}
6627 0 1 unless $editDirs->{'Meta'}
6640 1 0 if (defined $buff) { }
6644 0 0 unless $self->Options("IgnoreMinorErrors")
6647 0 1 unless length $$segDataPt > 6
6650 0 0 if ($$segDataPt =~ /^RMETA\0/)
6652 0 0 if $delGroup->{'RMETA'}
6655 0 0 if ($$segDataPt =~ /^SEAL\0/)
6657 0 0 if $delGroup->{'SEAL'}
6660 0 0 if ($$segDataPt =~ /^AROT\0\0/)
6662 0 0 if $delGroup->{'AROT'}
6665 0 0 if ($$segDataPt =~ /^JP/)
6667 0 0 if $delGroup->{'JUMBF'}
6670 1 0 if ($$segDataPt =~ /^Ducky/)
6672 0 1 if $delGroup->{'Ducky'}
6673 0 1 if $doneDir{'Ducky'}
6675 0 1 unless $editDirs->{'Ducky'}
6686 1 0 if (defined $newData)
6689 0 1 if length $newData
6692 1 0 unless length $$segDataPt
6695 8 1 if ($$segDataPt =~ /^$Image::ExifTool::psAPP13hdr/)
6698 0 8 if (defined $combinedSegData)
6704 0 8 if ($dirOrder[0] eq "Photoshop")
6706 0 0 unless defined $combinedSegData
6709 0 8 if ($doneDir{'Photoshop'})
6713 0 0 if $delGroup->{'Photoshop'}
6727 8 0 if (defined $newData)
6731 2 6 unless length $$segDataPt
6733 0 6 unless &WriteMultiSegment($outfile, $marker, $Image::ExifTool::psAPP13hdr, $segDataPt)
6739 4 0 if ($$segDataPt =~ /^Adobe/)
6742 0 4 if ($delGroup->{'Adobe'} or $editDirs->{'Adobe'})
6749 4 0 unless ($doneDir{'COM'})
6751 3 1 unless ($delGroup->{'File'} and $delGroup->{'File'} != 2)
6756 3 0 if ($self->IsOverwriting($nvHash, $val) or $delGroup->{'File'}) { }
6765 2 2 if (defined $newComment) { }
6768 0 2 unless &WriteMultiSegment($outfile, 254, "", \$newComment)
6770 0 2 if $verbose
6779 13 10 if ($del or $delGroup->{'*'} and not $segType and $marker >= 224 and $marker <= 239)
6780 1 12 unless $segType
6781 0 13 if $verbose
6786 449 4 if (defined $segDataPt and defined $$segDataPt)
6790 0 449 if ($size > $maxSegmentLen) { }
6791 0 0 unless $segType
6796 0 449 unless &Write($outfile, $hdr, $s, $$segDataPt)
6803 0 114 if defined $iccChunkCount
6804 2 112 if @$path > $pn
6806 0 114 if $oldOutfile
6807 114 0 if ($rtnVal)
6810 3 111 if $trailPt
6813 0 114 if $rtnVal and $err
6814 0 1 if ($creatingEXV and $rtnVal > 0 and not $self->{'CHANGED'})
6828 25 66 if (length $$valPtr and not $$valPtr =~ /^\xff\xd8/ and not $self->Options("IgnoreMinorErrors"))
6847 2646 17349 if ($format eq "string" or $format eq "undef")
6848 2293 353 unless $count and $count > 0
6850 217 136 if ($format eq 'string') { }
6851 10 207 if $len >= $count
6853 0 136 if $len > $count
6855 257 86 if ($len < $count)
6860 2132 15217 if ($count and $count != 1) { }
6862 151 1981 if $count < 0
6867 1059 16252 if (@vals != $count)
6868 3 1056 @vals > $count ? :
6873 17886 1409 if ($format =~ /^int/) { }
1406 3 elsif ($format =~ /^rational/ or $format eq 'float' or $format eq 'double') { }
6875 3332 14554 unless (&IsInt($val))
6876 7 3325 if (&IsHex($val)) { }
6880 2061 1264 unless &IsFloat($val) and $count == 1
6881 20 1244 $val < 0 ? :
6884 0 15825 unless my $rng = $intRange{$format}
6885 313 15512 if $val < $rng->[0]
6887 6 15506 if $val > $rng->[1] and $val != 4277010157
6890 273 1133 unless (&IsFloat($val))
6892 235 38 if ($format =~ /^rational/)
6893 1 234 if $val eq "inf" or $val eq "undef"
6894 70 164 if ($val =~ m[^([-+]?\d+)/(\d+)$])
6895 70 0 unless $1 < 0 and $format =~ /u$/
6901 0 1133 if ($format =~ /^rational\d+u$/ and $val < 0)
6917 4693 7808 unless ($format)
6919 3324 1369 if ($table and $table->{'FORMAT'}) { }
6927 1876 10625 if ($format =~ /(.*)\[(.*)\]/)
6931 3 1873 if $count =~ /\$size/
6945 0 3 if ($self->EncodeFileName($old)) { }
0 3 elsif ($self->EncodeFileName($new)) { }
6954 0 3 if ($winUni) { }
6961 3 0 if $result or $^O ne "MSWin32"
6965 0 0 if $try > 50
6981 0 0 if ($self->EncodeFileName($file)) { }
6982 0 0 if eval { do { Win32API::File::DeleteFileW($file) } }
6984 0 0 if unlink $file
7004 0 0 unless (ref $file)
7006 0 0 unless ($self->Open(\*FH, $file, "+<"))
7008 0 0 if (defined $atime or defined $mtime)
7010 0 0 unless defined $atime
7011 0 0 unless defined $mtime
7012 0 0 if defined $atime and defined $mtime
7014 0 0 unless $success
7021 0 0 if ($^O eq "MSWin32")
7022 0 0 if (not eval { do { require Win32::API } }) { }
0 0 elsif (not eval { do { require Win32API::File } }) { }
7029 0 0 unless ($win32Handle)
7037 0 0 unless defined $time
7044 0 0 unless ($k32SetFileTime)
7045 0 0 if defined $k32SetFileTime
7047 0 0 unless ($k32SetFileTime)
7053 0 0 unless ($k32SetFileTime->Call($win32Handle, $ctime, $atime, $mtime))
7061 0 0 if (defined $atime and defined $mtime)
7068 0 0 if $success or not defined $saveFile
7073 0 0 unless ($noWarn)
7074 0 0 if ($@ or $Image::ExifTool::evalWarning) { }
0 0 elsif (not $success) { }
7093 1 0 unless my $hash = $self->{'ImageDataHash'}
7097 0 0 if (defined $size)
7098 0 0 unless $size
7099 0 0 $size > 65536 ? :
7102 0 0 unless ($raf->Read($buff, $n))
7103 0 0 if $type and defined $size
7109 0 0 if ($self->{'OPTIONS'}{'Verbose'} and $bytesRead and $type and not $noMsg)
7124 74 53 unless $size > 0
7125 0 53 $size > 65536 ? :
7126 0 53 unless $raf->Read($buff, $n) == $n
7127 0 53 unless &Write($outfile, $buff)
7145 13 0 if $num
7148 0 24 unless $raf->Seek($pos, 0)
7150 0 0 defined $result ? :
0 24 unless $result
7152 3 21 if $pad
7153 0 24 if $err
7155 0 13 if ($err)
7169 15991 488 unless $self
7172 0 488 unless my $dataPt = $dirInfo->{'DataPt'}
7176 0 488 unless ($increment)
7182 220 268 if ($tagTablePtr->{'DATAMEMBER'})
7191 1 487 if not defined $dirLen or $dirLen > $dataLen - $dirStart
7192 0 488 unless my $newData = substr($$dataPt, $dirStart, $dirLen)
7201 22 205 if (ref $tagTablePtr->{$tagID} eq "ARRAY" or $tagInfo->{'Condition'})
7203 9 13 unless $writeInfo and $writeInfo eq $tagInfo
7213 87 131 if ($format) { }
7214 36 51 if ($format =~ /(.*)\[(.*)\]/) { }
1 50 elsif ($format eq 'string') { }
7221 0 36 if $@
7224 1 0 $dirLen > $entry ? :
7230 6 212 if @varInfo and $varInfo[0][0] == $tagID
7232 3 215 unless defined $val
7234 1 214 unless $self->IsOverwriting($nvHash, $val) > 0
7236 1 213 unless defined $newVal
7238 6 207 if $tagInfo->{'DataMember'}
7241 1 212 if $mask
7243 0 213 if ($tagInfo->{'DataTag'} and not $tagInfo->{'IsOffset'})
7244 0 0 unless $newVal == 4277010157
7246 0 0 if defined $data
7248 0 0 if ($format =~ /^int16/ and $newVal > 65535)
7253 213 0 if (defined $rtnVal) { }
7262 1 0 if ($tagTablePtr->{'IS_OFFSET'} and $dirInfo->{'Fixup'})
7268 0 1 unless $tagInfo = $self->GetTagInfo($tagTablePtr, $tagID)
7274 1 0 unless $entry <= $dirLen - 4
7279 0 0 unless $offset
7281 0 0 unless $tagInfo->{'DataTag'} and defined $tagInfo->{'OffsetPair'}
7287 0 0 unless defined $size
7288 0 0 if ($tagInfo->{'DataTag'} eq "HiddenData")
7298 0 0 unless $tagInfo->{'DataTag'} eq "PreviewImage" and $self->{'FILE_TYPE'} eq "JPEG"
7301 0 0 unless $previewInfo
7304 0 0 unless $format eq "int32u"
7305 0 0 if $tagInfo->{'IsOffset'} and $tagInfo->{'IsOffset'} eq 3
7308 0 0 unless (defined $previewInfo->{'Data'})
7309 0 0 if ($offset >= 0 and $offset + $size <= $dirInfo->{'DataLen'}) { }
7318 12 476 if ($tagTablePtr->{'IS_SUBDIR'})
7324 4 9 unless defined $tagInfo
7330 0 9 if $entry >= $dirLen
7332 0 9 unless ($tagInfo)
7334 0 0 if $more > 128
7337 0 0 unless $tagInfo
7339 0 9 unless my $subdir = $tagInfo->{'SubDirectory'}
7342 9 0 if (not $start) { }
0 0 elsif ($start =~ /\$/) { }
7348 0 0 if $format =~ /(.*)\[(.*)\]/
7351 0 0 unless $val
7355 0 0 if $start < $dirStart or $start > $dataLen
7357 0 0 unless $len and $len <= $dataLen - $start
7366 9 0 if defined $dat and length $dat
7379 0 113 unless $self
7382 113 0 if $self->ProcessTIFF($dirInfo, $tagTablePtr) > 0