exiftool-vendored.exe 13.40.0 → 13.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/exiftool.exe CHANGED
Binary file
@@ -11,7 +11,7 @@ use strict;
11
11
  use warnings;
12
12
  require 5.004;
13
13
 
14
- my $version = '13.40';
14
+ my $version = '13.42';
15
15
 
16
16
  $^W = 1; # enable global warnings
17
17
 
@@ -89,6 +89,7 @@ END {
89
89
  # declare all static file-scope variables
90
90
  my @commonArgs; # arguments common to all commands
91
91
  my @condition; # conditional processing of files
92
+ my @csvExclude; # list of tags excluded from CSV import
92
93
  my @csvFiles; # list of files when reading with CSV option (in ExifTool Charset)
93
94
  my @csvTags; # order of tags for first file with CSV option (lower case)
94
95
  my @delFiles; # list of files to delete
@@ -143,9 +144,9 @@ my $countNewDir; # count of directories created
143
144
  my $countSameWr; # count files written OK but not changed
144
145
  my $critical; # flag for critical operations (disable CTRL-C)
145
146
  my $csv; # flag for CSV option (set to "CSV", or maybe "JSON" when writing)
146
- my $csvAdd; # flag to add CSV information to existing lists
147
147
  my $csvDelim; # delimiter for CSV files
148
- my $csvSaveCount; # save counter for last CSV file loaded
148
+ my $dbAdd; # flag to add CSV/JSON information to existing lists
149
+ my $dbSaveCount; # save counter for last CSV/JSON file loaded
149
150
  my $deleteOrig; # 0=restore original files, 1=delete originals, 2=delete w/o asking
150
151
  my $diff; # file name for comparing differences
151
152
  my $disableOutput; # flag to disable normal output
@@ -454,6 +455,7 @@ if ($stayOpen >= 2) {
454
455
  # (not done: @commonArgs, @moreArgs, $critical, $binaryStdout, $helped,
455
456
  # $interrupted, $mt, $pause, $rtnValApp, $rtnValPrev, $stayOpen, $stayOpenBuff, $stayOpenFile)
456
457
  undef @condition;
458
+ undef @csvExclude;
457
459
  undef @csvFiles;
458
460
  undef @csvTags;
459
461
  undef @delFiles;
@@ -496,7 +498,7 @@ undef $binSep;
496
498
  undef $binTerm;
497
499
  undef $comma;
498
500
  undef $csv;
499
- undef $csvAdd;
501
+ undef $dbAdd;
500
502
  undef $deleteOrig;
501
503
  undef $diff;
502
504
  undef $disableOutput;
@@ -561,7 +563,7 @@ $countGoodWr = 0;
561
563
  $countNewDir = 0;
562
564
  $countSameWr = 0;
563
565
  $csvDelim = ',';
564
- $csvSaveCount = 0;
566
+ $dbSaveCount = 0;
565
567
  $fileTrailer = '';
566
568
  $filterFlag = 0;
567
569
  $html = 0;
@@ -591,6 +593,7 @@ my $escapeXML; # flag to escape printed values for xml
591
593
  my $setTagsFile; # filename for last TagsFromFile option
592
594
  my $sortOpt; # sort option is used
593
595
  my $srcStdin; # one of the source files is STDIN
596
+ my $tagsFrom = ''; # tags on command line come from 'CSV' or 'File'
594
597
  my $useMWG; # flag set if we are using any MWG tag
595
598
 
596
599
  my ($argsLeft, @nextPass, $badCmd);
@@ -825,6 +828,7 @@ for (;;) {
825
828
  }
826
829
  # create necessary lists, etc for this new -tagsFromFile file
827
830
  AddSetTagsFile($setTagsFile, { Replace => ($1 and lc($1) eq 'add') ? 0 : 1 } );
831
+ $tagsFrom = 'File';
828
832
  next;
829
833
  }
830
834
  if ($a eq '@') {
@@ -932,35 +936,50 @@ for (;;) {
932
936
  next;
933
937
  }
934
938
  /^config$/i and Warn("Ignored -config option (not first on command line)\n"), shift, next;
935
- if (/^csv(\+?=.*)?$/i) {
936
- my $csvFile = $1;
939
+ if (/^(csv|j(son)?)(\+?=.*)?$/i) {
940
+ my $dbFile = $3;
941
+ my $dbType = lc($1) eq 'csv' ? 'CSV' : 'JSON';
942
+ unless ($dbFile) {
943
+ if ($dbType eq 'CSV') {
944
+ $csv = $dbType;
945
+ } else {
946
+ $json = 1;
947
+ $html = $xml = 0;
948
+ $mt->Options(Duplicates => 1);
949
+ require Image::ExifTool::XMP; # for FixUTF8()
950
+ }
951
+ next;
952
+ }
937
953
  # must process on 2nd pass so -f and -charset options are available
938
954
  unless ($pass) {
955
+ @tags and Warn("Tag arguments should come after the -$1= option\n");
939
956
  push @nextPass, "-$_";
940
- if ($csvFile) {
941
- push @newValues, { SaveCount => ++$saveCount }; # marker to save new values now
942
- $csvSaveCount = $saveCount;
943
- }
957
+ push @newValues, { SaveCount => ++$saveCount }; # marker to save new values now
958
+ $dbSaveCount = $saveCount;
959
+ $tagsFrom = 'CSV';
944
960
  next;
945
961
  }
946
- if ($csvFile) {
947
- $csvFile =~ s/^(\+?=)//;
948
- $csvAdd = 2 if $1 eq '+=';
949
- $vout = \*STDERR if $srcStdin;
950
- $verbose and print $vout "Reading CSV file $csvFile\n";
951
- my $msg;
952
- if ($mt->Open(\*CSVFILE, $csvFile)) {
953
- binmode CSVFILE;
954
- require Image::ExifTool::Import;
962
+ $dbFile =~ s/^(\+?=)//;
963
+ $dbAdd = 2 if $1 eq '+=';
964
+ $vout = \*STDERR if $srcStdin;
965
+ $verbose and print $vout "Reading $dbType file $dbFile\n";
966
+ my $msg;
967
+ if ($mt->Open(\*CSVFILE, $dbFile)) {
968
+ binmode CSVFILE;
969
+ require Image::ExifTool::Import;
970
+ if ($dbType eq 'CSV') {
955
971
  $msg = Image::ExifTool::Import::ReadCSV(\*CSVFILE, \%database, $forcePrint, $csvDelim);
956
- close(CSVFILE);
957
972
  } else {
958
- $msg = "Error opening CSV file '${csvFile}'";
973
+ my $chset = $mt->Options('Charset');
974
+ $msg = Image::ExifTool::Import::ReadJSON(\*CSVFILE, \%database, $forcePrint, $chset);
959
975
  }
960
- $msg and Warn("$msg\n");
961
- $isWriting = 1;
976
+ close(CSVFILE);
977
+ } else {
978
+ $msg = "Error opening $dbType file '${dbFile}'";
962
979
  }
963
- $csv = 'CSV';
980
+ $msg and Warn("$msg\n");
981
+ $isWriting = 1;
982
+ $csv = $dbType;
964
983
  next;
965
984
  }
966
985
  if (/^csvdelim$/i) {
@@ -1123,41 +1142,6 @@ for (;;) {
1123
1142
  push @condition, $cond;
1124
1143
  next;
1125
1144
  }
1126
- if (/^j(son)?(\+?=.*)?$/i) {
1127
- if ($2) {
1128
- # must process on 2nd pass because we need -f and -charset options
1129
- unless ($pass) {
1130
- push @nextPass, "-$_";
1131
- push @newValues, { SaveCount => ++$saveCount }; # marker to save new values now
1132
- $csvSaveCount = $saveCount;
1133
- next;
1134
- }
1135
- my $jsonFile = $2;
1136
- $jsonFile =~ s/^(\+?=)//;
1137
- $csvAdd = 2 if $1 eq '+=';
1138
- $vout = \*STDERR if $srcStdin;
1139
- $verbose and print $vout "Reading JSON file $jsonFile\n";
1140
- my $chset = $mt->Options('Charset');
1141
- my $msg;
1142
- if ($mt->Open(\*JSONFILE, $jsonFile)) {
1143
- binmode JSONFILE;
1144
- require Image::ExifTool::Import;
1145
- $msg = Image::ExifTool::Import::ReadJSON(\*JSONFILE, \%database, $forcePrint, $chset);
1146
- close(JSONFILE);
1147
- } else {
1148
- $msg = "Error opening JSON file '${jsonFile}'";
1149
- }
1150
- $msg and Warn("$msg\n");
1151
- $isWriting = 1;
1152
- $csv = 'JSON';
1153
- } else {
1154
- $json = 1;
1155
- $html = $xml = 0;
1156
- $mt->Options(Duplicates => 1);
1157
- require Image::ExifTool::XMP; # for FixUTF8()
1158
- }
1159
- next;
1160
- }
1161
1145
  /^(k|pause)$/i and $pause = 1, next;
1162
1146
  (/^l$/ or $a eq 'long') and --$outFormat, next;
1163
1147
  (/^L$/ or $a eq 'latin') and $mt->Options(Charset => 'Latin'), next;
@@ -1378,10 +1362,12 @@ for (;;) {
1378
1362
  my $tag = shift;
1379
1363
  defined $tag or Error("Expecting tag name for -x option\n"), $badCmd=1, next;
1380
1364
  $tag =~ s/\ball\b/\*/ig; # replace 'all' with '*' in tag names
1381
- if ($setTagsFile) {
1382
- push @{$setTags{$setTagsFile}}, "-$tag";
1383
- } else {
1365
+ if (not $tagsFrom) {
1384
1366
  push @exclude, $tag;
1367
+ } elsif ($tagsFrom eq 'CSV') {
1368
+ push @csvExclude, $tag;
1369
+ } else {
1370
+ push @{$setTags{$setTagsFile}}, "-$tag";
1385
1371
  }
1386
1372
  next;
1387
1373
  }
@@ -1424,9 +1410,15 @@ for (;;) {
1424
1410
  }
1425
1411
  } else {
1426
1412
  # assume '-tagsFromFile @' if tags are being redirected
1427
- # and -tagsFromFile hasn't already been specified
1428
- AddSetTagsFile($setTagsFile = '@') if not $setTagsFile and /(<|>)/;
1429
- if ($setTagsFile) {
1413
+ # and not from CSV and -tagsFromFile hasn't already been specified
1414
+ if (not $setTagsFile and $tagsFrom ne 'CSV' and /(<|>)/) {
1415
+ AddSetTagsFile($setTagsFile = '@');
1416
+ $tagsFrom = 'File';
1417
+ }
1418
+ if ($tagsFrom eq 'CSV') {
1419
+ my $lst = s/^-// ? \@csvExclude : \@tags;
1420
+ push @$lst, $_;
1421
+ } elsif ($setTagsFile) {
1430
1422
  push @{$setTags{$setTagsFile}}, $_;
1431
1423
  if ($1 eq '>') {
1432
1424
  $useMWG = 1 if /^(.*>\s*)?([-_0-9A-Z]+:)*1?mwg:/si;
@@ -1719,7 +1711,7 @@ if (@newValues) {
1719
1711
  $saveCount = $mt->SaveNewValues();
1720
1712
  $needSave = 0;
1721
1713
  # insert marker to load values from CSV file now if this was the CSV file
1722
- push @dynamicFiles, \$csv if $$_{SaveCount} == $csvSaveCount;
1714
+ push @dynamicFiles, \$csv if $$_{SaveCount} == $dbSaveCount;
1723
1715
  }
1724
1716
  next;
1725
1717
  }
@@ -1795,11 +1787,9 @@ if (@newValues) {
1795
1787
  $wrn and Warning($mt, $wrn);
1796
1788
  }
1797
1789
  # exclude specified tags
1798
- unless ($csv) {
1799
- foreach (@exclude) {
1800
- $mt->SetNewValue($_, undef, Replace => 2);
1801
- $needSave = 1;
1802
- }
1790
+ foreach (@exclude) {
1791
+ $mt->SetNewValue($_, undef, Replace => 2);
1792
+ $needSave = 1;
1803
1793
  }
1804
1794
  unless ($isWriting or $outOpt or @tags) {
1805
1795
  Error "Nothing to do.\n";
@@ -3251,7 +3241,7 @@ sub SetImageInfo($$$)
3251
3241
  next;
3252
3242
  } elsif (ref $dyFile eq 'SCALAR') {
3253
3243
  # set new values from CSV or JSON database
3254
- my ($f, $found, $csvTag, $tryTag, $tg);
3244
+ my ($f, $found, $csvTag, $tg, $csvEtPrt, $csvEtVal);
3255
3245
  undef $evalWarning;
3256
3246
  local $SIG{'__WARN__'} = sub { $evalWarning = $_[0] };
3257
3247
  # force UTF-8 if the database was JSON
@@ -3279,46 +3269,74 @@ sub SetImageInfo($$$)
3279
3269
  if ($verbose) {
3280
3270
  print $vout "Setting new values from $csv database\n";
3281
3271
  print $vout 'Including tags: ',join(' ',@tags),"\n" if @tags;
3282
- print $vout 'Excluding tags: ',join(' ',@exclude),"\n" if @exclude;
3272
+ print $vout 'Excluding tags: ',join(' ',@csvExclude),"\n" if @csvExclude;
3283
3273
  }
3284
- my @tryTags = (@exclude, @tags); # (exclude first because it takes priority)
3285
- foreach (@tryTags) {
3274
+ if (@tags) {
3275
+ # prepare a dummy ExifTool object to hold appropriate tags from the database
3276
+ $csvEtPrt = Image::ExifTool->new unless $csvEtPrt;
3277
+ foreach $csvTag (OrderedKeys($csvInfo)) {
3278
+ next if $csvTag =~ /^([-_0-9A-Z]+:)*(SourceFile|Directory|FileName)$/i;
3279
+ my @grps = split /:/, $csvTag;
3280
+ my $name = pop @grps;
3281
+ unshift @grps, 'All' while @grps < 2;
3282
+ if ($name =~ s/#$//) {
3283
+ # handle ValueConv tags separately
3284
+ $csvEtVal = Image::ExifTool->new unless $csvEtVal;
3285
+ $csvEtVal->FoundTag($name, $$csvInfo{$csvTag}, @grps);
3286
+ } else {
3287
+ $csvEtPrt->FoundTag($name, $$csvInfo{$csvTag}, @grps);
3288
+ }
3289
+ }
3290
+ next;
3291
+ }
3292
+ my @exclTags = @csvExclude;
3293
+ foreach (@exclTags) {
3286
3294
  tr/-0-9a-zA-Z_:#?*//dc; # remove illegal characters
3287
3295
  s/(^|:)(all:)+/$1/ig; # remove 'all' group names
3288
3296
  s/(^|:)all(#?)$/$1*$2/i; # convert 'all' tag name to '*'
3289
3297
  tr/?/./; s/\*/.*/g; # convert wildcards for regex
3290
3298
  }
3299
+ # run through tags in database order
3291
3300
  foreach $csvTag (OrderedKeys($csvInfo)) {
3292
3301
  # don't write SourceFile, Directory or FileName
3293
3302
  next if $csvTag =~ /^([-_0-9A-Z]+:)*(SourceFile|Directory|FileName)$/i;
3294
- if (@tryTags) {
3295
- my ($i, $tryGrp, $matched);
3296
- TryMatch: for ($i=0; $i<@tryTags; ++$i) {
3297
- $tryTag = $tryTags[$i];
3298
- if ($tryTag =~ /:/) {
3303
+ if (@exclTags) {
3304
+ my ($exclTag, $exclGrp, $excluded);
3305
+ ExclMatch: foreach $exclTag (@exclTags) {
3306
+ if ($exclTag =~ /:/) {
3299
3307
  next unless $csvTag =~ /:/; # db entry must also specify group
3300
3308
  my @csvGrps = split /:/, $csvTag;
3301
- my @tryGrps = split /:/, $tryTag;
3302
- my $tryName = pop @tryGrps;
3303
- next unless pop(@csvGrps) =~ /^$tryName$/i; # tag name must match
3304
- foreach $tryGrp (@tryGrps) {
3309
+ my @exclGrps = split /:/, $exclTag;
3310
+ my $exclName = pop @exclGrps;
3311
+ next unless pop(@csvGrps) =~ /^$exclName$/i; # tag name must match
3312
+ foreach $exclGrp (@exclGrps) {
3305
3313
  # each specified group name must match db entry
3306
- next TryMatch unless grep /^$tryGrp$/i, @csvGrps;
3314
+ next ExclMatch unless grep /^$exclGrp$/i, @csvGrps;
3307
3315
  }
3308
- $matched = 1;
3316
+ $excluded = 1;
3309
3317
  last;
3310
3318
  }
3311
3319
  # no group specified, so match by tag name only
3312
- $csvTag =~ /^([-_0-9A-Z]+:)*$tryTag$/i and $matched = 1, last;
3320
+ $csvTag =~ /^([-_0-9A-Z]+:)*$exclTag$/i and $excluded = 1, last;
3313
3321
  }
3314
- next if $matched ? $i < @exclude : @tags;
3322
+ next if $excluded;
3315
3323
  }
3316
3324
  my ($rtn, $wrn) = $et->SetNewValue($csvTag, $$csvInfo{$csvTag},
3317
- Protected => 1, AddValue => $csvAdd,
3318
- ProtectSaved => $csvSaveCount);
3325
+ Protected => 1, AddValue => $dbAdd,
3326
+ ProtectSaved => $dbSaveCount);
3319
3327
  $wrn and Warn "$wrn\n" if $verbose;
3320
3328
  }
3321
3329
  }
3330
+ # set specified tags now
3331
+ if ($csvEtPrt) {
3332
+ my @excl = map "-$_", @csvExclude; # add back leading dashes
3333
+ my $opts = { AddValue => $dbAdd, Replace => 0 };
3334
+ $et->SetNewValuesFromFile($csvEtPrt, $opts, @tags, @excl);
3335
+ if ($csvEtVal) {
3336
+ $$opts{Type} = 'ValueConv';
3337
+ $et->SetNewValuesFromFile($csvEtVal, $opts, @tags, @excl);
3338
+ }
3339
+ }
3322
3340
  $et->Options(Charset => $old) if $csv eq 'JSON';
3323
3341
  unless ($found) {
3324
3342
  Warn("No SourceFile '${file}' in imported $csv database\n");
@@ -88,7 +88,7 @@ sub ProcessCTMD($$$);
88
88
  sub ProcessExifInfo($$$);
89
89
  sub SwapWords($);
90
90
 
91
- $VERSION = '4.97';
91
+ $VERSION = '4.99';
92
92
 
93
93
  # Note: Removed 'USM' from 'L' lenses since it is redundant - PH
94
94
  # (or is it? Ref 32 shows 5 non-USM L-type lenses)
@@ -562,6 +562,7 @@ $VERSION = '4.97';
562
562
  4160 => 'Canon EF-S 35mm f/2.8 Macro IS STM', #42
563
563
  4208 => 'Sigma 56mm f/1.4 DC DN | C or other Sigma Lens', #forum10603
564
564
  4208.1 => 'Sigma 30mm F1.4 DC DN | C', #github#83 (016)
565
+ 4976 => 'Sigma 16-300mm F3.5-6.7 DC OS | C (025)', #50
565
566
  6512 => 'Sigma 12mm F1.4 DC | C', #github#352 (025)
566
567
  # (Nano USM lenses - 0x90xx)
567
568
  36910 => 'Canon EF 70-300mm f/4-5.6 IS II USM', #42
@@ -642,6 +643,7 @@ $VERSION = '4.97';
642
643
  '61182.63' => 'Canon RF 24mm F1.4 L VCM', #42
643
644
  '61182.64' => 'Canon RF 20mm F1.4 L VCM', #42
644
645
  '61182.65' => 'Canon RF 85mm F1.4 L VCM', #github350
646
+ '61182.66' => 'Canon RF 45mm F1.2 STM', #42
645
647
  65535 => 'n/a',
646
648
  );
647
649
 
@@ -1008,10 +1010,11 @@ $VERSION = '4.97';
1008
1010
  0x80000487 => 'EOS R8', #42
1009
1011
  0x80000491 => 'PowerShot V10', #25
1010
1012
  0x80000495 => 'EOS R1', #PH
1011
- 0x80000496 => 'R5 Mark II', #forum16406
1013
+ 0x80000496 => 'EOS R5 Mark II', #forum16406
1012
1014
  0x80000497 => 'PowerShot V1', #PH
1013
1015
  0x80000498 => 'EOS R100', #25
1014
1016
  0x80000516 => 'EOS R50 V', #42
1017
+ 0x80000518 => 'EOS R6 Mark III', #42
1015
1018
  0x80000520 => 'EOS D2000C', #IB
1016
1019
  0x80000560 => 'EOS D6000C', #PH (guess)
1017
1020
  );
@@ -1995,12 +1998,12 @@ my %offOn = ( 0 => 'Off', 1 => 'On' );
1995
1998
  SubDirectory => { TagTable => 'Image::ExifTool::Canon::ColorData10' },
1996
1999
  },
1997
2000
  { # (int16u[3973]) - R3 ref IB
1998
- Condition => '$count == 3973 or $count == 3778',
2001
+ Condition => '($count == 3973 or $count == 3778) and $$valPt !~ /^\x41\0/',
1999
2002
  Name => 'ColorData11',
2000
2003
  SubDirectory => { TagTable => 'Image::ExifTool::Canon::ColorData11' },
2001
2004
  },
2002
- { # (int16u[4528]) - R1/R5mkII ref forum16406
2003
- Condition => '$count == 4528',
2005
+ { # (int16u[4528]) - R1/R5mkII (4528) ref forum16406, R50V (3778) ref PH
2006
+ Condition => '$count == 4528 or $count == 3778',
2004
2007
  Name => 'ColorData12',
2005
2008
  SubDirectory => { TagTable => 'Image::ExifTool::Canon::ColorData12' },
2006
2009
  },
@@ -7052,6 +7055,7 @@ my %ciMaxFocal = (
7052
7055
  326 => 'Canon RF 24mm F1.4 L VCM', #42
7053
7056
  327 => 'Canon RF 20mm F1.4 L VCM', #42
7054
7057
  328 => 'Canon RF 85mm F1.4 L VCM', #42/github350
7058
+ 330 => 'Canon RF 45mm F1.2 STM', #42
7055
7059
  # Note: add new RF lenses to %canonLensTypes with ID 61182
7056
7060
  },
7057
7061
  },
@@ -8321,8 +8325,8 @@ my %ciMaxFocal = (
8321
8325
  RawConv => '$$self{ColorDataVersion} = $val',
8322
8326
  PrintConv => {
8323
8327
  16 => '16 (M50)',
8324
- 17 => '17 (EOS R)', # (and PowerShot SX740HS)
8325
- 18 => '18 (EOS RP/250D)', # (and PowerShot SX70HS)
8328
+ 17 => '17 (R)', # (and PowerShot SX740HS)
8329
+ 18 => '18 (RP/250D)', # (and PowerShot SX70HS)
8326
8330
  19 => '19 (90D/850D/M6mkII/M200)',# (and PowerShot G7XmkIII)
8327
8331
  },
8328
8332
  },
@@ -8553,10 +8557,10 @@ my %ciMaxFocal = (
8553
8557
  },
8554
8558
  );
8555
8559
 
8556
- # Color data (MakerNotes tag 0x4001, count=3973, ref IB)
8560
+ # Color data (MakerNotes tag 0x4001, count=3973/3778, ref IB)
8557
8561
  %Image::ExifTool::Canon::ColorData11 = (
8558
8562
  %binaryDataAttrs,
8559
- NOTES => 'These tags are used by the EOS R3, R7 and R6mkII',
8563
+ NOTES => 'These tags are used by the EOS R3, R7, R50 and R6mkII',
8560
8564
  FORMAT => 'int16s',
8561
8565
  FIRST_ENTRY => 0,
8562
8566
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
@@ -8568,7 +8572,7 @@ my %ciMaxFocal = (
8568
8572
  RawConv => '$$self{ColorDataVersion} = $val',
8569
8573
  PrintConv => {
8570
8574
  34 => '34 (R3)', #IB
8571
- 48 => '48 (R7, R10, R6 Mark II)', #IB
8575
+ 48 => '48 (R7/R10/R50/R6mkII)', #IB
8572
8576
  },
8573
8577
  },
8574
8578
  0x69 => { Name => 'WB_RGGBLevelsAsShot', Format => 'int16s[4]' },
@@ -8673,10 +8677,10 @@ my %ciMaxFocal = (
8673
8677
  },
8674
8678
  );
8675
8679
 
8676
- # Color data (MakerNotes tag 0x4001, count=4528, ref PH)
8680
+ # Color data (MakerNotes tag 0x4001, count=4528/3778, ref PH)
8677
8681
  %Image::ExifTool::Canon::ColorData12 = (
8678
8682
  %binaryDataAttrs,
8679
- NOTES => 'These tags are used by the EOS R1 and R5mkII',
8683
+ NOTES => 'These tags are used by the EOS R1, R5mkII and R50V',
8680
8684
  FORMAT => 'int16s',
8681
8685
  FIRST_ENTRY => 0,
8682
8686
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
@@ -8687,7 +8691,8 @@ my %ciMaxFocal = (
8687
8691
  DataMember => 'ColorDataVersion',
8688
8692
  RawConv => '$$self{ColorDataVersion} = $val',
8689
8693
  PrintConv => {
8690
- 64 => '64 (R1, R5 Mark II)',
8694
+ 64 => '64 (R1/R5mkII)',
8695
+ 65 => '65 (R50V)',
8691
8696
  },
8692
8697
  },
8693
8698
  0x69 => { Name => 'WB_RGGBLevelsAsShot', Format => 'int16s[4]' }, # (NC)
@@ -8778,6 +8783,7 @@ my %ciMaxFocal = (
8778
8783
  Name => 'PerChannelBlackLevel',
8779
8784
  Format => 'int16u[4]',
8780
8785
  },
8786
+ # 0x290 - PerChannelBlackLevel again
8781
8787
  0x294 => {
8782
8788
  Name => 'NormalWhiteLevel',
8783
8789
  Format => 'int16u',
@@ -57,7 +57,7 @@ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat
57
57
  use Image::ExifTool qw(:DataAccess :Utils);
58
58
  use Image::ExifTool::MakerNotes;
59
59
 
60
- $VERSION = '4.60';
60
+ $VERSION = '4.61';
61
61
 
62
62
  sub ProcessExif($$$);
63
63
  sub WriteExif($$$);
@@ -6191,10 +6191,15 @@ sub ProcessExif($$$)
6191
6191
  my $isExif = ($tagTablePtr eq \%Image::ExifTool::Exif::Main);
6192
6192
 
6193
6193
  # warn for incorrect maker notes in CR3 files
6194
- if ($$dirInfo{DirName} eq 'MakerNotes' and $$et{FileType} eq 'CR3' and
6195
- $$dirInfo{Parent} and $$dirInfo{Parent} eq 'ExifIFD')
6196
- {
6197
- $et->Warn("MakerNotes shouldn't exist ExifIFD of CR3 image", 1);
6194
+ if ($dirName eq 'MakerNotes') {
6195
+ if ($$et{FileType} eq 'CR3' and $$dirInfo{Parent} and $$dirInfo{Parent} eq 'ExifIFD') {
6196
+ $et->Warn("MakerNotes shouldn't exist ExifIFD of CR3 image", 1);
6197
+ }
6198
+ if ($$dirInfo{TagInfo} and $$dirInfo{TagInfo}{MakerNotes} and
6199
+ $$et{ExifByteOrder} and $$et{ExifByteOrder} ne GetByteOrder())
6200
+ {
6201
+ $et->FoundTag(MakerNoteByteOrder => GetByteOrder());
6202
+ }
6198
6203
  }
6199
6204
  # set flag to calculate image data hash if requested
6200
6205
  $doHash = 1 if $$et{ImageDataHash} and (($$et{FILE_TYPE} eq 'TIFF' and not $base and not $inMakerNotes) or
@@ -6281,7 +6286,7 @@ sub ProcessExif($$$)
6281
6286
  $dirSize = 2 + 12 * $numEntries;
6282
6287
  $dirEnd = $dirStart + $dirSize;
6283
6288
  }
6284
- $verbose > 0 and $et->VerboseDir($dirName, $numEntries);
6289
+ $verbose > 0 and $et->VerboseDir($dirName, $numEntries, undef, GetByteOrder());
6285
6290
  my $bytesFromEnd = $dataLen - $dirEnd;
6286
6291
  if ($bytesFromEnd < 4) {
6287
6292
  unless ($bytesFromEnd==2 or $bytesFromEnd==0) {
@@ -184,7 +184,7 @@ my %ttCharset = (
184
184
  Custom => { },
185
185
  );
186
186
 
187
- # codes for the 63 known WOFF2 tags
187
+ # the 63 known WOFF2 tags
188
188
  my @knownTags = (
189
189
  'cmap', 'head', 'hhea', 'hmtx', 'maxp', 'name', 'OS/2', 'post', 'cvt',
190
190
  'fpgm', 'glyf', 'loca', 'prep', 'CFF', 'VORG', 'EBDT', 'EBLC', 'gasp',
@@ -891,9 +891,8 @@ This module is used by Image::ExifTool
891
891
 
892
892
  This module contains the routines required by Image::ExifTool to read meta
893
893
  information from various format font files. Currently recognized font file
894
- types are OTF, TTF, TTC, DFONT, PFA, PFB, PFM, AFM, ACFM and AMFM. As well,
895
- WOFF and WOFF2 font files are identified, but metadata is not currently
896
- extracted from these formats.
894
+ types are OTF, TTF, TTC, DFONT, PFA, PFB, PFM, AFM, ACFM, AMFM, WOFF and
895
+ WOFF2.
897
896
 
898
897
  =head1 AUTHOR
899
898
 
@@ -26,7 +26,7 @@ use strict;
26
26
  use vars qw($VERSION);
27
27
  use Image::ExifTool qw(:DataAccess :Utils);
28
28
 
29
- $VERSION = '1.41';
29
+ $VERSION = '1.42';
30
30
 
31
31
  sub ProcessICC($$);
32
32
  sub ProcessICC_Profile($$$);
@@ -330,6 +330,7 @@ my %manuSig = ( #6
330
330
  'WTG2' => 'Ware To Go',
331
331
  'WYSE' => 'WYSE Technology',
332
332
  'XERX' => 'Xerox Corporation',
333
+ 'XM ' => 'Xiaomi',
333
334
  'XRIT' => 'X-Rite',
334
335
  'yxym' => 'YxyMaster GmbH',
335
336
  'Z123' => "Lavanya's test Company",
@@ -14,9 +14,9 @@ use vars qw($VERSION);
14
14
  use Image::ExifTool qw(:DataAccess :Utils);
15
15
  use Image::ExifTool::Import;
16
16
 
17
- $VERSION = '1.10';
17
+ $VERSION = '1.11';
18
18
 
19
- sub ProcessJSON($$);
19
+ sub ProcessJSON($$;$);
20
20
  sub ProcessTag($$$$%);
21
21
 
22
22
  %Image::ExifTool::JSON::Main = (
@@ -71,6 +71,7 @@ sub FoundTag($$$$%)
71
71
  $name = Image::ExifTool::MakeTagName($name);
72
72
  my $desc = Image::ExifTool::MakeDescription($name);
73
73
  $desc =~ s/^C2 PA/C2PA/; # hack to get "C2PA" correct
74
+ $et->VPrint(0, $$et{INDENT}, "[adding $tag]\n");
74
75
  AddTagToTable($tagTablePtr, $tag, {
75
76
  Name => $name,
76
77
  Description => $desc,
@@ -112,12 +113,12 @@ sub ProcessTag($$$$%)
112
113
 
113
114
  #------------------------------------------------------------------------------
114
115
  # Extract meta information from a JSON file
115
- # Inputs: 0) ExifTool object reference, 1) dirInfo reference
116
+ # Inputs: 0) ExifTool object reference, 1) dirInfo reference, 2) tag table ref
116
117
  # Returns: 1 on success, 0 if this wasn't a recognized JSON file
117
- sub ProcessJSON($$)
118
+ sub ProcessJSON($$;$)
118
119
  {
119
120
  local $_;
120
- my ($et, $dirInfo) = @_;
121
+ my ($et, $dirInfo, $tagTablePtr) = @_;
121
122
  my $raf = $$dirInfo{RAF};
122
123
  my $structOpt = $et->Options('Struct');
123
124
  my (%database, $key, $tag, $dataPt);
@@ -149,7 +150,7 @@ sub ProcessJSON($$)
149
150
 
150
151
  $et->SetFileType() unless $dataPt;
151
152
 
152
- my $tagTablePtr = GetTagTable('Image::ExifTool::JSON::Main');
153
+ $tagTablePtr or $tagTablePtr = GetTagTable('Image::ExifTool::JSON::Main');
153
154
 
154
155
  # remove any old tag definitions in case they change flags
155
156
  foreach $key (TagTableKeys($tagTablePtr)) {
@@ -18,7 +18,7 @@ use vars qw($VERSION);
18
18
  use Image::ExifTool qw(:DataAccess :Utils);
19
19
  use Image::ExifTool::Microsoft;
20
20
 
21
- $VERSION = '1.12';
21
+ $VERSION = '1.13';
22
22
 
23
23
  sub ProcessItemID($$$);
24
24
  sub ProcessLinkInfo($$$);
@@ -191,7 +191,7 @@ sub ProcessLinkInfo($$$);
191
191
  },
192
192
  0xa0000001 => {
193
193
  Name => 'EnvVarData',
194
- SubDirectory => { TagTable => 'Image::ExifTool::LNK::UnknownData' },
194
+ SubDirectory => { TagTable => 'Image::ExifTool::LNK::EnvVarData' },
195
195
  },
196
196
  0xa0000002 => {
197
197
  Name => 'ConsoleData',
@@ -448,6 +448,19 @@ sub ProcessLinkInfo($$$);
448
448
  },
449
449
  );
450
450
 
451
+ %Image::ExifTool::LNK::EnvVarData = (
452
+ PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
453
+ GROUPS => { 2 => 'Other' },
454
+ 8 => {
455
+ Name => 'EnvironmentTarget',
456
+ Format => 'string[260]',
457
+ },
458
+ 268 => {
459
+ Name => 'EnvironmentTargetUnicode',
460
+ Format => 'unicode[260]',
461
+ },
462
+ );
463
+
451
464
  %Image::ExifTool::LNK::INI = (
452
465
  GROUPS => { 2 => 'Document' },
453
466
  VARS => { ID_FMT => 'none' },
@@ -42,7 +42,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
42
42
  use Image::ExifTool::Exif;
43
43
  use Image::ExifTool::APP12;
44
44
 
45
- $VERSION = '2.92';
45
+ $VERSION = '2.93';
46
46
 
47
47
  sub PrintLensInfo($$$);
48
48
 
@@ -201,8 +201,9 @@ my %olympusLensTypes = (
201
201
  # '65535 07 40' - Seen for LUMIX S 16-35/F4 on Panasonic DC-S1H (ref PH)
202
202
  # Other makes
203
203
  '24 01 10' => 'Venus Optics Laowa 50mm F2.8 2x Macro', #DonKomarechka
204
- 'f7 03 10' => 'LAOWA C&D-Dreamer MFT 7.5mm F2.0', #forum3833
205
- 'f7 10 10' => 'LAOWA C&D-Dreamer MFT 6.0mm F2.0', #KG
204
+ '247 03 10' => 'LAOWA C&D-Dreamer MFT 7.5mm F2.0', #forum3833
205
+ '247 10 10' => 'LAOWA C&D-Dreamer MFT 6.0mm F2.0', #KG
206
+ '65522 02 10' => 'Xiaoyi 42.5mm F1.8', #github363
206
207
  );
207
208
 
208
209
  # lookup for Olympus camera types (ref PH)