exiftool_vendored 12.76.0 → 12.80.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +79 -4
  3. data/bin/MANIFEST +27 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +3 -3
  7. data/bin/config_files/acdsee.config +37 -57
  8. data/bin/config_files/example.config +16 -2
  9. data/bin/exiftool +84 -29
  10. data/bin/lib/Image/ExifTool/Canon.pm +12 -9
  11. data/bin/lib/Image/ExifTool/CanonVRD.pm +7 -1
  12. data/bin/lib/Image/ExifTool/Exif.pm +52 -4
  13. data/bin/lib/Image/ExifTool/FujiFilm.pm +3 -0
  14. data/bin/lib/Image/ExifTool/GPS.pm +5 -3
  15. data/bin/lib/Image/ExifTool/GeoLang/cs.pm +978 -0
  16. data/bin/lib/Image/ExifTool/GeoLang/de.pm +1975 -0
  17. data/bin/lib/Image/ExifTool/GeoLang/en_ca.pm +44 -0
  18. data/bin/lib/Image/ExifTool/GeoLang/en_gb.pm +124 -0
  19. data/bin/lib/Image/ExifTool/GeoLang/es.pm +2921 -0
  20. data/bin/lib/Image/ExifTool/GeoLang/fi.pm +1116 -0
  21. data/bin/lib/Image/ExifTool/GeoLang/fr.pm +3171 -0
  22. data/bin/lib/Image/ExifTool/GeoLang/it.pm +2750 -0
  23. data/bin/lib/Image/ExifTool/GeoLang/ja.pm +10256 -0
  24. data/bin/lib/Image/ExifTool/GeoLang/ko.pm +4499 -0
  25. data/bin/lib/Image/ExifTool/GeoLang/nl.pm +1270 -0
  26. data/bin/lib/Image/ExifTool/GeoLang/pl.pm +3019 -0
  27. data/bin/lib/Image/ExifTool/GeoLang/ru.pm +18220 -0
  28. data/bin/lib/Image/ExifTool/GeoLang/sk.pm +441 -0
  29. data/bin/lib/Image/ExifTool/GeoLang/sv.pm +714 -0
  30. data/bin/lib/Image/ExifTool/GeoLang/tr.pm +452 -0
  31. data/bin/lib/Image/ExifTool/GeoLang/zh_cn.pm +2225 -0
  32. data/bin/lib/Image/ExifTool/GeoLang/zh_tw.pm +72 -0
  33. data/bin/lib/Image/ExifTool/Geolocation.dat +0 -0
  34. data/bin/lib/Image/ExifTool/Geolocation.pm +775 -0
  35. data/bin/lib/Image/ExifTool/Geotag.pm +8 -1
  36. data/bin/lib/Image/ExifTool/HtmlDump.pm +2 -1
  37. data/bin/lib/Image/ExifTool/Import.pm +5 -2
  38. data/bin/lib/Image/ExifTool/JSON.pm +15 -10
  39. data/bin/lib/Image/ExifTool/MWG.pm +1 -0
  40. data/bin/lib/Image/ExifTool/MacOS.pm +19 -4
  41. data/bin/lib/Image/ExifTool/Nikon.pm +2 -2
  42. data/bin/lib/Image/ExifTool/Ogg.pm +3 -2
  43. data/bin/lib/Image/ExifTool/Olympus.pm +3 -1
  44. data/bin/lib/Image/ExifTool/OpenEXR.pm +17 -17
  45. data/bin/lib/Image/ExifTool/PDF.pm +5 -5
  46. data/bin/lib/Image/ExifTool/Pentax.pm +1 -1
  47. data/bin/lib/Image/ExifTool/QuickTime.pm +183 -11
  48. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +253 -237
  49. data/bin/lib/Image/ExifTool/README +6 -5
  50. data/bin/lib/Image/ExifTool/TagLookup.pm +2624 -2520
  51. data/bin/lib/Image/ExifTool/TagNames.pod +184 -4
  52. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +15 -1
  53. data/bin/lib/Image/ExifTool/WriteXMP.pl +1 -1
  54. data/bin/lib/Image/ExifTool/Writer.pl +59 -8
  55. data/bin/lib/Image/ExifTool/XMP.pm +17 -2
  56. data/bin/lib/Image/ExifTool/XMP2.pl +64 -0
  57. data/bin/lib/Image/ExifTool.pm +249 -47
  58. data/bin/lib/Image/ExifTool.pod +57 -25
  59. data/bin/perl-Image-ExifTool.spec +2 -2
  60. data/lib/exiftool_vendored/version.rb +1 -1
  61. metadata +22 -2
data/bin/exiftool CHANGED
@@ -11,7 +11,7 @@ use strict;
11
11
  use warnings;
12
12
  require 5.004;
13
13
 
14
- my $version = '12.76';
14
+ my $version = '12.80';
15
15
 
16
16
  # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
17
17
  my $exePath;
@@ -166,6 +166,7 @@ my $filtered; # flag indicating file was filtered by name
166
166
  my $filterFlag; # file filter flag (0x01=deny extensions, 0x02=allow extensions, 0x04=add ext)
167
167
  my $fixLen; # flag to fix description lengths when writing alternate languages
168
168
  my $forcePrint; # string to use for missing tag values (undef to not print them)
169
+ my $geoOnly; # flag to extract Geolocation tags only
169
170
  my $helped; # flag to avoid printing help if no tags specified
170
171
  my $html; # flag for html-formatted output (2=html dump)
171
172
  my $interrupted; # flag set if CTRL-C is pressed during a critical process
@@ -490,6 +491,7 @@ undef $fileHeader;
490
491
  undef $filtered;
491
492
  undef $fixLen;
492
493
  undef $forcePrint;
494
+ undef $geoOnly;
493
495
  undef $ignoreHidden;
494
496
  undef $joinLists;
495
497
  undef $langOpt;
@@ -587,6 +589,11 @@ if (not $preserveTime and $^O eq 'MSWin32') {
587
589
  $preserveTime = 2 if eval { require Win32::API } and eval { require Win32API::File };
588
590
  }
589
591
 
592
+ # add user-defined command-line arguments
593
+ if (@Image::ExifTool::UserDefined::Arguments) {
594
+ unshift @ARGV, @Image::ExifTool::UserDefined::Arguments;
595
+ }
596
+
590
597
  # parse command-line options in 2 passes...
591
598
  # pass 1: set all of our ExifTool options
592
599
  # pass 2: print all of our help and informational output (-list, -ver, etc)
@@ -663,7 +670,7 @@ for (;;) {
663
670
  next;
664
671
  }
665
672
  my $a = lc $_;
666
- if (/^list([wfrdx]|wf|g(\d*))?$/i) {
673
+ if (/^list([wfrdx]|wf|g(\d*)|geo)?$/i) {
667
674
  $pass or push @nextPass, "-$_";
668
675
  my $type = lc($1 || '');
669
676
  if (not $type or $type eq 'w' or $type eq 'x') {
@@ -712,6 +719,23 @@ for (;;) {
712
719
  PrintTagList('Recognized file extensions', GetFileType(undef, 0));
713
720
  } elsif ($type eq 'd') {
714
721
  PrintTagList('Deletable groups', GetDeleteGroups());
722
+ } elsif ($type eq 'geo') {
723
+ require Image::ExifTool::Geolocation;
724
+ my ($i, $entry);
725
+ print "Geolocation database:\n" unless $quiet;
726
+ print "City,Region,Subregion,CountryCode,Country,TimeZone,FeatureCode,Population,Latitude,Longitude\n";
727
+ Image::ExifTool::Geolocation::SortDatabase('City') if $sortOpt;
728
+ my $minPop = $mt->Options('GeolocMinPop');
729
+ my $feature = $mt->Options('GeolocFeature') || '';
730
+ my $neg = $feature =~ s/^-//;
731
+ my %fcodes = map { lc($_) => 1 } split /\s*,\s*/, $feature;
732
+ for ($i=0; ; ++$i) {
733
+ my @entry = Image::ExifTool::Geolocation::GetEntry($i,$langOpt) or last;
734
+ next if $minPop and $entry[7] < $minPop;
735
+ next if %fcodes and $neg ? $fcodes{lc $entry[6]} : not $fcodes{lc $entry[6]};
736
+ $_ = defined $_ ? $mt->Decode($_, 'UTF8') : '' foreach @entry[0,1,2,4];
737
+ print join(',', @entry), "\n";
738
+ }
715
739
  } else { # 'g(\d*)'
716
740
  # list all groups in specified family
717
741
  my $family = $2 || 0;
@@ -1102,7 +1126,7 @@ for (;;) {
1102
1126
  } else {
1103
1127
  $pass or push(@nextPass, '-lang'), next;
1104
1128
  }
1105
- my $langs = "Available languages:\n";
1129
+ my $langs = $quiet ? '' : "Available languages:\n";
1106
1130
  $langs .= " $_ - $Image::ExifTool::langName{$_}\n" foreach @Image::ExifTool::langs;
1107
1131
  $langs =~ tr/_/-/; # display dashes instead of underlines in language codes
1108
1132
  $langs = Image::ExifTool::HTML::EscapeHTML($langs) if $escapeHTML;
@@ -1414,8 +1438,15 @@ if ($useMWG and not defined $mt->Options('CharsetEXIF')) {
1414
1438
  $mt->Options(CharsetEXIF => 'UTF8');
1415
1439
  }
1416
1440
 
1441
+ # allow geolocation without input file if set to a position
1442
+ if (not @files and not $outOpt and not @newValues) {
1443
+ my $loc = $mt->Options('Geolocation');
1444
+ # use undocumented feature to input JSON file directly from command line
1445
+ $loc and $loc ne '1' and push(@files, qq(\@JSON:{})), $geoOnly = 1;
1446
+ }
1447
+
1417
1448
  # print help
1418
- unless ((@tags and not $outOpt) or @files or @newValues) {
1449
+ unless ((@tags and not $outOpt) or @files or @newValues or $geoOnly) {
1419
1450
  if ($doGlob and $doGlob == 2) {
1420
1451
  Warn "No matching files\n";
1421
1452
  $rtnVal = 1;
@@ -2113,6 +2144,11 @@ sub GetImageInfo($$)
2113
2144
  # can't make use of $info if verbose because we must reprocess
2114
2145
  # the file anyway to generate the verbose output
2115
2146
  undef $info if $verbose or defined $fastCondition;
2147
+ } elsif ($file =~ s/^(\@JSON:)(.*)/$1/) {
2148
+ # read JSON file from command line
2149
+ my $dat = $2;
2150
+ $info = $et->ImageInfo(\$dat, \@foundTags);
2151
+ if ($geoOnly) { /^Geolocation/ or delete $$info{$_} foreach keys %$info; $file = ' ' }
2116
2152
  }
2117
2153
  if (defined $deleteOrig) {
2118
2154
  Progress($vout, "======== $file") if defined $verbose;
@@ -2169,7 +2205,7 @@ sub GetImageInfo($$)
2169
2205
  }
2170
2206
 
2171
2207
  # extract information from this file
2172
- unless ($file eq '-' or $et->Exists($file)) {
2208
+ unless ($file eq '-' or $et->Exists($file) or $info) {
2173
2209
  Warn "Error: File not found - $file\n";
2174
2210
  FileNotFound($file);
2175
2211
  defined $outfile and close($fp), undef($tmpText), $et->Unlink($outfile);
@@ -2354,7 +2390,7 @@ sub GetImageInfo($$)
2354
2390
  # set delimiters for JSON or PHP output
2355
2391
  ($bra, $ket, $sep) = $json == 1 ? ('{','}',':') : ('Array(',')',' =>');
2356
2392
  print $fp ",\n" if $comma;
2357
- print $fp qq($bra\n "SourceFile"$sep ), EscapeJSON(MyConvertFileName($et,$file));
2393
+ print $fp qq($bra\n "SourceFile"$sep ), EscapeJSON(MyConvertFileName($et,$file),1);
2358
2394
  $comma = 1;
2359
2395
  $ind = (defined $showGroup and not $allGroup) ? ' ' : ' ';
2360
2396
  } elsif ($csv) {
@@ -3372,7 +3408,22 @@ sub FormatXML($$$)
3372
3408
  my @keys = $$val{_ordered_keys_} ? @{$$val{_ordered_keys_}} : sort keys %$val;
3373
3409
  foreach (@keys) {
3374
3410
  # (some variable-namespace XML structure fields may have a different group)
3375
- my $tok = /:/ ? $_ : ($grp . ':' . $_);
3411
+ my ($ns, $tg) = ($grp, $_);
3412
+ if (/^(.*?):(.*)/) {
3413
+ if ($grp eq 'JSON') {
3414
+ $tg =~ tr/:/_/; # colons in JSON structure elements are not namespaces
3415
+ } else {
3416
+ ($ns, $tg) = ($1, $2);
3417
+ }
3418
+ }
3419
+ # validate XML attribute name
3420
+ my $name;
3421
+ foreach $name ($ns, $tg) {
3422
+ # make sure name is valid for XML
3423
+ $name =~ tr/-_A-Za-z0-9.//dc;
3424
+ $name = '_' . $name if $name !~ /^[_A-Za-z]/;
3425
+ }
3426
+ my $tok = $ns . ':' . $tg;
3376
3427
  $val2 .= "\n$ind <$tok" . FormatXML($$val{$_}, "$ind ", $grp) . "</$tok>";
3377
3428
  }
3378
3429
  $val = "$val2\n$ind";
@@ -3515,7 +3566,7 @@ sub PrintCSV()
3515
3566
  }
3516
3567
 
3517
3568
  #------------------------------------------------------------------------------
3518
- # Add tag groups from structure fields to a list
3569
+ # Add tag groups from structure fields to a list for xmlns
3519
3570
  # Inputs: 0) tag value, 1) parent group, 2) group hash ref, 3) group list ref
3520
3571
  sub AddGroups($$$$)
3521
3572
  {
@@ -3523,7 +3574,7 @@ sub AddGroups($$$$)
3523
3574
  my ($key, $val2);
3524
3575
  if (ref $val eq 'HASH') {
3525
3576
  foreach $key (sort keys %$val) {
3526
- if ($key =~ /(.*?):/ and not $$groupHash{$1}) {
3577
+ if ($key =~ /^(.*?):/ and not $$groupHash{$1} and $grp ne 'JSON') {
3527
3578
  $$groupHash{$1} = $grp;
3528
3579
  push @$groupList, $1;
3529
3580
  }
@@ -4614,7 +4665,7 @@ B<exiftool> [I<OPTIONS>] B<-tagsFromFile> I<SRCFILE>
4614
4665
  =head2 Other
4615
4666
 
4616
4667
  B<exiftool> [ B<-ver> |
4617
- B<-list>[B<w>|B<f>|B<r>|B<wf>|B<g>[I<NUM>]|B<d>|B<x>] ]
4668
+ B<-list>[B<w>|B<f>|B<r>|B<wf>|B<g>[I<NUM>]|B<d>|B<x>|B<geo>] ]
4618
4669
 
4619
4670
  For specific examples, see the L<EXAMPLES|/READING EXAMPLES> sections below.
4620
4671
 
@@ -4655,7 +4706,7 @@ supported by ExifTool (r = read, w = write, c = create):
4655
4706
  3GP r/w | DSS r | JP2 r/w | ODT r | RWL r/w
4656
4707
  7Z r | DV r | JPEG r/w | OFR r | RWZ r
4657
4708
  A r | DVB r/w | JSON r | OGG r | RM r
4658
- AA r | DVR-MS r | JXL r | OGV r | SEQ r
4709
+ AA r | DVR-MS r | JXL r/w | OGV r | SEQ r
4659
4710
  AAC r | DYLIB r | K25 r | ONP r | SKETCH r
4660
4711
  AAE r | EIP r | KDC r | OPUS r | SO r
4661
4712
  AAX r/w | EPS r/w | KEY r | ORF r/w | SR2 r/w
@@ -4824,7 +4875,7 @@ L<Advanced options|/Advanced options>
4824
4875
  -common_args Define common arguments
4825
4876
  -config CFGFILE Specify configuration file name
4826
4877
  -echo[NUM] TEXT Echo text to stdout or stderr
4827
- -efile[NUM][!] ERRFILE Save names of files with errors
4878
+ -efile[NUM][!] TXTFILE Save names of files with errors
4828
4879
  -execute[NUM] Execute multiple commands on one line
4829
4880
  -fileNUM ALTFILE Load tags from alternate file
4830
4881
  -list_dir List directories, not their contents
@@ -5216,8 +5267,9 @@ Notes:
5216
5267
  when copying tags using the B<-tagsFromFile> option.
5217
5268
 
5218
5269
  2) If the hemisphere is known, a reference direction (N, S, E or W) is
5219
- appended to each printed coordinate, but adding a C<+> to the format
5220
- specifier (eg. C<%+.6f>) prints a signed coordinate instead.
5270
+ appended to each printed coordinate, but adding a C<+> or C<-> to the format
5271
+ specifier (eg. C<%+.6f> or C<%-.6f>) prints a signed coordinate instead.
5272
+ (C<+> adds a leading "+" for positive coordinates, but C<-> does not.)
5221
5273
 
5222
5274
  3) This print formatting may be disabled with the B<-n> option to extract
5223
5275
  coordinates as signed decimal degrees.
@@ -5605,7 +5657,7 @@ with this command:
5605
5657
 
5606
5658
  produces output like this:
5607
5659
 
5608
- -- Generated by ExifTool 12.76 --
5660
+ -- Generated by ExifTool 12.80 --
5609
5661
  File: a.jpg - 2003:10:31 15:44:19
5610
5662
  (f/5.6, 1/60s, ISO 100)
5611
5663
  File: b.jpg - 2006:05:23 11:57:38
@@ -6367,22 +6419,24 @@ prevent the command window from closing when run as a Windows drag and drop
6367
6419
  application.
6368
6420
 
6369
6421
  =item B<-list>, B<-listw>, B<-listf>, B<-listr>, B<-listwf>,
6370
- B<-listg>[I<NUM>], B<-listd>, B<-listx>
6422
+ B<-listg>[I<NUM>], B<-listd>, B<-listx>, B<-listgeo>
6371
6423
 
6372
6424
  Print a list of all valid tag names (B<-list>), all writable tag names
6373
6425
  (B<-listw>), all supported file extensions (B<-listf>), all recognized file
6374
6426
  extensions (B<-listr>), all writable file extensions (B<-listwf>), all tag
6375
6427
  groups [in a specified family] (B<-listg>[I<NUM>]), all deletable tag groups
6376
- (B<-listd>), or an XML database of tag details including language
6377
- translations (B<-listx>). The B<-list>, B<-listw> and B<-listx> options may
6378
- be followed by an additional argument of the form C<-GROUP:All> to list only
6379
- tags in a specific group, where C<GROUP> is one or more family 0-2 group
6380
- names (excepting EXIF IFD groups) separated by colons. With B<-listg>,
6381
- I<NUM> may be given to specify the group family, otherwise family 0 is
6382
- assumed. The B<-l> option may be combined with B<-listf>, B<-listr> or
6383
- B<-listwf> to add file descriptions to the list. The B<-lang> option may be
6384
- combined with B<-listx> to output descriptions in a single language. Here
6385
- are some examples:
6428
+ (B<-listd>), an XML database of tag details including language translations
6429
+ (B<-listx>), or the Geolocation database (B<-listgeo>). The B<-list>,
6430
+ B<-listw> and B<-listx> options may be followed by an additional argument of
6431
+ the form C<-GROUP:All> to list only tags in a specific group, where C<GROUP>
6432
+ is one or more family 0-2 group names (excepting EXIF IFD groups) separated
6433
+ by colons. With B<-listg>, I<NUM> may be given to specify the group family,
6434
+ otherwise family 0 is assumed. The B<-l> option may be combined with
6435
+ B<-listf>, B<-listr> or B<-listwf> to add file descriptions to the list.
6436
+ The B<-lang> option may be combined with B<-listx> to output descriptions in
6437
+ a single language, and the B<-sort> and/or B<-lang> options may be combined
6438
+ with B<-listgeo>. Also, the API GeolocMinPop and GeolocFeature options
6439
+ apply to the B<-listgeo> output. Here are some examples:
6386
6440
 
6387
6441
  -list # list all tag names
6388
6442
  -list -EXIF:All # list all EXIF tags
@@ -6395,6 +6449,7 @@ are some examples:
6395
6449
  -listd # list all deletable groups
6396
6450
  -listx -EXIF:All # list database of EXIF tags in XML format
6397
6451
  -listx -XMP:All -s # list short XML database of XMP tags
6452
+ -listgeo -lang de # list geolocation database in German
6398
6453
 
6399
6454
  When combined with B<-listx>, the B<-s> option shortens the output by
6400
6455
  omitting the descriptions and values (as in the last example above), and
@@ -6596,15 +6651,15 @@ respectively) after processing is complete. For B<-echo3> and B<-echo4>,
6596
6651
  "${status}" may be used in the I<TEXT> string to represent the numerical
6597
6652
  exit status of the command (see L</EXIT STATUS>).
6598
6653
 
6599
- =item B<-efile>[I<NUM>][!] I<ERRFILE>
6654
+ =item B<-efile>[I<NUM>][!] I<TXTFILE>
6600
6655
 
6601
6656
  Save the names of files giving errors (I<NUM> missing or 1), files that were
6602
6657
  unchanged (I<NUM> is 2), files that fail the B<-if> condition (I<NUM> is 4),
6603
6658
  files that were updated (I<NUM> is 8), files that were created (I<NUM> is
6604
6659
  16), or any combination thereof by summing I<NUM> (eg. B<-efile3> is the
6605
6660
  same has having both B<-efile> and B<-efile2> options with the same
6606
- I<ERRFILE>). By default, file names are appended to any existing I<ERRFILE>,
6607
- but I<ERRFILE> is overwritten if an exclamation point is added to the option
6661
+ I<TXTFILE>). By default, file names are appended to any existing I<TXTFILE>,
6662
+ but I<TXTFILE> is overwritten if an exclamation point is added to the option
6608
6663
  (eg. B<-efile!>). Saves the name of the file specified by the B<-srcfile>
6609
6664
  option if applicable.
6610
6665
 
@@ -88,7 +88,7 @@ sub ProcessCTMD($$$);
88
88
  sub ProcessExifInfo($$$);
89
89
  sub SwapWords($);
90
90
 
91
- $VERSION = '4.73';
91
+ $VERSION = '4.74';
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)
@@ -203,7 +203,8 @@ $VERSION = '4.73';
203
203
  52 => 'Canon EF-S 18-55mm f/3.5-5.6 IS II', #PH
204
204
  53 => 'Canon EF-S 18-55mm f/3.5-5.6 III', #Jon Charnas
205
205
  54 => 'Canon EF-S 55-250mm f/4-5.6 IS II', #47
206
- 60 => 'Irix 11mm f/4', #50
206
+ 60 => 'Irix 11mm f/4 or 15mm f/2.4', #50
207
+ 60.1 => 'Irix 15mm f/2.4', #forum15655
207
208
  63 => 'Irix 30mm F1.4 Dragonfly', #IB
208
209
  80 => 'Canon TS-E 50mm f/2.8L Macro', #42
209
210
  81 => 'Canon TS-E 90mm f/2.8L Macro', #42
@@ -4731,6 +4732,7 @@ my %ciMaxFocal = (
4731
4732
  NOTES => 'CameraInfo tags for the PowerShot G5 X Mark II.',
4732
4733
  0x0293 => {
4733
4734
  Name => 'ShutterCount',
4735
+ Condition => '$$self{FileType} eq "JPEG"',
4734
4736
  Format => 'int32u',
4735
4737
  Notes => 'includes electronic + mechanical shutter',
4736
4738
  # - advances by 1 for each photo file, regardless of mechanical or electronic shutter
@@ -4738,26 +4740,27 @@ my %ciMaxFocal = (
4738
4740
  # - advances for time lapse video files
4739
4741
  # - creating a new directory or resetting the counter from the menu doesn't affect this shutter count
4740
4742
  },
4743
+ 0x0a95 => {
4744
+ Name => 'ShutterCount',
4745
+ Condition => '$$self{FileType} eq "CR3"',
4746
+ Format => 'int32u',
4747
+ Notes => 'includes electronic + mechanical shutter',
4748
+ },
4741
4749
  0x0b21 => {
4742
4750
  Name => 'DirectoryIndex',
4751
+ Condition => '$$self{FileType} eq "JPEG"',
4743
4752
  Groups => { 2 => 'Image' },
4744
4753
  Format => 'int32u',
4745
4754
  },
4746
4755
  0x0b2d => {
4747
4756
  Name => 'FileIndex',
4757
+ Condition => '$$self{FileType} eq "JPEG"',
4748
4758
  Format => 'int32u',
4749
4759
  Groups => { 2 => 'Image' },
4750
4760
  Format => 'int32u',
4751
4761
  ValueConv => '$val + 1',
4752
4762
  ValueConvInv => '$val - 1',
4753
4763
  },
4754
- #0x0b39 => {
4755
- # Name => 'DirectoryIndex',
4756
- # Groups => { 2 => 'Image' },
4757
- # Format => 'int32u',
4758
- # ValueConv => '$val - 1',
4759
- # ValueConvInv => '$val + 1',
4760
- #},
4761
4764
  );
4762
4765
 
4763
4766
  # Canon camera information for 70D (MakerNotes tag 0x0d) (ref PH)
@@ -23,7 +23,7 @@ use vars qw($VERSION);
23
23
  use Image::ExifTool qw(:DataAccess :Utils);
24
24
  use Image::ExifTool::Canon;
25
25
 
26
- $VERSION = '1.37';
26
+ $VERSION = '1.38';
27
27
 
28
28
  sub ProcessCanonVRD($$;$);
29
29
  sub WriteCanonVRD($$;$);
@@ -51,6 +51,7 @@ my %vrdFormat = (
51
51
  8 => 'int32u',
52
52
  9 => 'int32s',
53
53
  13 => 'double',
54
+ 24 => 'int32s', # (rectangle coordinates)
54
55
  33 => 'int32u', # (array)
55
56
  38 => 'double', # (array)
56
57
  # 254 => 'undef', ?
@@ -1226,6 +1227,11 @@ my $blankFooter = "CANON OPTIONAL DATA\0" . ("\0" x 42) . "\xff\xd9";
1226
1227
  # 0x20a08 - (unknown picture style settings)
1227
1228
  # 0x20a09 - Custom picture style settings
1228
1229
  # 0x20a20 - Fine Detail picture style settings
1230
+ 0x20b10 => 'DPRAWMicroadjustBackFront', #forum15660
1231
+ 0x20b12 => 'DPRAWMicroadjustStrength', #forum15660
1232
+ 0x20b20 => 'DPRAWBokehShift', #forum15660
1233
+ 0x20b21 => 'DPRAWBokehShiftArea', #PH
1234
+ 0x20b30 => 'DPRAWGhostingReductionArea', #forum15660
1229
1235
  0x30101 => {
1230
1236
  Name => 'CropAspectRatio',
1231
1237
  PrintConv => {
@@ -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.50';
60
+ $VERSION = '4.51';
61
61
 
62
62
  sub ProcessExif($$$);
63
63
  sub WriteExif($$$);
@@ -593,6 +593,14 @@ my %opcodeInfo = (
593
593
  OffsetPair => 0x117, # point to associated byte counts
594
594
  DataTag => 'OtherImage',
595
595
  },
596
+ {
597
+ Condition => '$$self{Compression} and $$self{Compression} eq "52546"', # DNG 1.7 Jpeg XL
598
+ Name => 'PreviewJXLStart',
599
+ IsOffset => 1,
600
+ IsImageData => 1,
601
+ OffsetPair => 0x117, # point to associated byte counts
602
+ DataTag => 'PreviewJXL',
603
+ },
596
604
  {
597
605
  # (APP1 IFD2 is for Leica JPEG preview)
598
606
  Condition => q[
@@ -687,6 +695,12 @@ my %opcodeInfo = (
687
695
  OffsetPair => 0x111, # point to associated offset
688
696
  DataTag => 'OtherImage',
689
697
  },
698
+ {
699
+ Condition => '$$self{Compression} and $$self{Compression} eq "52546"', # DNG 1.7 Jpeg XL
700
+ Name => 'PreviewJXLLength',
701
+ OffsetPair => 0x111, # point to associated offset
702
+ DataTag => 'PreviewJXL',
703
+ },
690
704
  {
691
705
  # (APP1 IFD2 is for Leica JPEG preview)
692
706
  Condition => q[
@@ -2421,7 +2435,7 @@ my %opcodeInfo = (
2421
2435
  Count => -1, # 2, 3 or 4 values
2422
2436
  },
2423
2437
  0x9215 => 'ExposureIndex', #12
2424
- 0x9216 => 'TIFF-EPStandardID', #12
2438
+ 0x9216 => { Name => 'TIFF-EPStandardID', PrintConv => '$val =~ tr/ /./; $val' }, #12
2425
2439
  0x9217 => { #12
2426
2440
  Name => 'SensingMethod',
2427
2441
  Groups => { 2 => 'Camera' },
@@ -2711,7 +2725,7 @@ my %opcodeInfo = (
2711
2725
  Count => 2,
2712
2726
  },
2713
2727
  0xa215 => { Name => 'ExposureIndex', Writable => 'rational64u' },
2714
- 0xa216 => 'TIFF-EPStandardID',
2728
+ 0xa216 => { Name => 'TIFF-EPStandardID', PrintConv => '$val =~ tr/ /./; $val' },
2715
2729
  0xa217 => {
2716
2730
  Name => 'SensingMethod',
2717
2731
  Groups => { 2 => 'Camera' },
@@ -4971,6 +4985,39 @@ my %subSecConv = (
4971
4985
  Image::ExifTool::Exif::ExtractImage($self,$val[0],$val[1],"OtherImage");
4972
4986
  },
4973
4987
  },
4988
+ PreviewJXL => {
4989
+ Groups => { 0 => 'EXIF', 1 => 'SubIFD', 2 => 'Preview' },
4990
+ Require => {
4991
+ 0 => 'PreviewJXLStart',
4992
+ 1 => 'PreviewJXLLength',
4993
+ },
4994
+ Desire => {
4995
+ 2 => 'PreviewJXLStart (1)',
4996
+ 3 => 'PreviewJXLLength (1)',
4997
+ },
4998
+ # retrieve all other JXL images
4999
+ RawConv => q{
5000
+ if ($val[2] and $val[3]) {
5001
+ my $i = 1;
5002
+ for (;;) {
5003
+ my %val = ( 0 => $$val{2}, 1 => $$val{3} );
5004
+ $self->FoundTag($tagInfo, \%val);
5005
+ ++$i;
5006
+ $$val{2} = "$$val{0} ($i)";
5007
+ last unless defined $$self{VALUE}{$$val{2}};
5008
+ $$val{3} = "$$val{1} ($i)";
5009
+ last unless defined $$self{VALUE}{$$val{3}};
5010
+ }
5011
+ }
5012
+ @grps = $self->GetGroup($$val{0});
5013
+ my $image = $self->ExtractBinary($val[0], $val[1], 'PreviewJXL');
5014
+ unless ($image =~ /^(Binary data|\xff\x0a|\0\0\0\x0cJXL \x0d\x0a......ftypjxl )/s) {
5015
+ $self->Warn("$tag is not a valid JXL image",1);
5016
+ return undef;
5017
+ }
5018
+ return \$image;
5019
+ },
5020
+ },
4974
5021
  PreviewImageSize => {
4975
5022
  Require => {
4976
5023
  0 => 'PreviewImageWidth',
@@ -5096,7 +5143,8 @@ my %subSecConv = (
5096
5143
  GPSLongitudeRef => '(defined $val and $val =~ / (-?)/) ? ($1 ? "W" : "E") : undef',
5097
5144
  },
5098
5145
  PrintConvInv => q{
5099
- return undef unless $val =~ /(.*? ?[NS]?), ?(.*? ?[EW]?)$/;
5146
+ return undef unless $val =~ /(.*? ?[NS]?), ?(.*? ?[EW]?)$/ or
5147
+ $val =~ /^\s*(-?\d+(?:\.\d+)?)\s*(-?\d+(?:\.\d+)?)\s*$/;
5100
5148
  my ($lat, $lon) = ($1, $2);
5101
5149
  require Image::ExifTool::GPS;
5102
5150
  $lat = Image::ExifTool::GPS::ToDegrees($lat, 1, "lat");
@@ -528,6 +528,7 @@ my %faceCategories = (
528
528
  1 => 'Full-frame on GFX', #IB
529
529
  2 => 'Sports Finder Mode', # (mechanical shutter)
530
530
  4 => 'Electronic Shutter 1.25x Crop', # (continuous high)
531
+ 8 => 'Digital Tele-Conv', #forum15784
531
532
  },
532
533
  },
533
534
  0x104e => { #forum10800 (X-Pro3)
@@ -549,6 +550,8 @@ my %faceCategories = (
549
550
  3 => 'Electronic Front Curtain', #10
550
551
  },
551
552
  },
553
+ 0x1051 => { Name => 'CropTopLeft', Writable => 'int32u' }, #forum15784
554
+ 0x1052 => { Name => 'CropCenter', Writable => 'int32u' }, #forum15784
552
555
  # 0x1100 - This may not work well for newer cameras (ref forum12682)
553
556
  0x1100 => [{
554
557
  Name => 'AutoBracketing',
@@ -12,7 +12,7 @@ use strict;
12
12
  use vars qw($VERSION);
13
13
  use Image::ExifTool::Exif;
14
14
 
15
- $VERSION = '1.55';
15
+ $VERSION = '1.56';
16
16
 
17
17
  my %coordConv = (
18
18
  ValueConv => 'Image::ExifTool::GPS::ToDegrees($val)',
@@ -491,7 +491,7 @@ sub PrintTimeStamp($)
491
491
  sub ToDMS($$;$$)
492
492
  {
493
493
  my ($et, $val, $doPrintConv, $ref) = @_;
494
- my ($fmt, @fmt, $num, $sign, $rtnVal, $neg);
494
+ my ($fmt, @fmt, $num, $sign, $minus, $rtnVal, $neg);
495
495
 
496
496
  unless (length $val) {
497
497
  # don't convert an empty value
@@ -503,8 +503,10 @@ sub ToDMS($$;$$)
503
503
  $val = -$val;
504
504
  $ref = {N => 'S', E => 'W'}->{$ref};
505
505
  $sign = '-';
506
+ $minus = '-';
506
507
  } else {
507
508
  $sign = '+';
509
+ $minus = '';
508
510
  }
509
511
  $ref = " $ref" unless $doPrintConv and $doPrintConv eq '2';
510
512
  } else {
@@ -522,7 +524,7 @@ sub ToDMS($$;$$)
522
524
  $fmt = q{%d deg %d' %.2f"} . $ref;
523
525
  } elsif ($ref) {
524
526
  # use signed value instead of reference direction if specified
525
- $fmt =~ s/%\+/$sign%/g or $fmt .= $ref;
527
+ $fmt =~ s/%\+/$sign%/g or $fmt =~ s/%-/$minus%/g or $fmt .= $ref;
526
528
  } else {
527
529
  $fmt =~ s/%\+/%/g; # don't know sign, so don't print it
528
530
  }