exiftool-vendored.pl 12.40.0 → 12.43.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.
Files changed (45) hide show
  1. package/bin/Changes +71 -6
  2. package/bin/META.json +1 -1
  3. package/bin/META.yml +1 -1
  4. package/bin/README +2 -2
  5. package/bin/arg_files/exif2xmp.args +5 -0
  6. package/bin/arg_files/xmp2exif.args +6 -0
  7. package/bin/exiftool +54 -22
  8. package/bin/lib/Image/ExifTool/Apple.pm +11 -2
  9. package/bin/lib/Image/ExifTool/Canon.pm +45 -22
  10. package/bin/lib/Image/ExifTool/DJI.pm +60 -1
  11. package/bin/lib/Image/ExifTool/DNG.pm +8 -2
  12. package/bin/lib/Image/ExifTool/DarwinCore.pm +12 -1
  13. package/bin/lib/Image/ExifTool/Exif.pm +11 -2
  14. package/bin/lib/Image/ExifTool/FlashPix.pm +14 -1
  15. package/bin/lib/Image/ExifTool/FujiFilm.pm +21 -2
  16. package/bin/lib/Image/ExifTool/Geotag.pm +24 -4
  17. package/bin/lib/Image/ExifTool/ICC_Profile.pm +10 -8
  18. package/bin/lib/Image/ExifTool/ID3.pm +5 -5
  19. package/bin/lib/Image/ExifTool/LNK.pm +5 -2
  20. package/bin/lib/Image/ExifTool/MacOS.pm +9 -9
  21. package/bin/lib/Image/ExifTool/MakerNotes.pm +17 -1
  22. package/bin/lib/Image/ExifTool/Nikon.pm +21 -6
  23. package/bin/lib/Image/ExifTool/NikonCustom.pm +4 -1
  24. package/bin/lib/Image/ExifTool/Olympus.pm +22 -2
  25. package/bin/lib/Image/ExifTool/PDF.pm +2 -1
  26. package/bin/lib/Image/ExifTool/Panasonic.pm +10 -1
  27. package/bin/lib/Image/ExifTool/Parrot.pm +1 -0
  28. package/bin/lib/Image/ExifTool/Pentax.pm +1 -1
  29. package/bin/lib/Image/ExifTool/Photoshop.pm +6 -5
  30. package/bin/lib/Image/ExifTool/QuickTime.pm +1 -1
  31. package/bin/lib/Image/ExifTool/QuickTimeStream.pl +40 -8
  32. package/bin/lib/Image/ExifTool/README +5 -1
  33. package/bin/lib/Image/ExifTool/Samsung.pm +233 -2
  34. package/bin/lib/Image/ExifTool/Shortcuts.pm +3 -1
  35. package/bin/lib/Image/ExifTool/Sony.pm +35 -31
  36. package/bin/lib/Image/ExifTool/TagLookup.pm +2510 -2479
  37. package/bin/lib/Image/ExifTool/TagNames.pod +137 -85
  38. package/bin/lib/Image/ExifTool/WritePhotoshop.pl +5 -5
  39. package/bin/lib/Image/ExifTool/WriteQuickTime.pl +2 -2
  40. package/bin/lib/Image/ExifTool/Writer.pl +2 -1
  41. package/bin/lib/Image/ExifTool.pm +40 -16
  42. package/bin/lib/Image/ExifTool.pod +13 -4
  43. package/bin/perl-Image-ExifTool.spec +1 -1
  44. package/bin/pp_build_exe.args +4 -4
  45. package/package.json +14 -3
@@ -15,7 +15,7 @@ use strict;
15
15
  use vars qw($VERSION);
16
16
  use Image::ExifTool::XMP;
17
17
 
18
- $VERSION = '1.06';
18
+ $VERSION = '1.07';
19
19
 
20
20
  my %dateTimeInfo = (
21
21
  # NOTE: Do NOT put "Groups" here because Groups hash must not be common!
@@ -138,6 +138,9 @@ my %event = (
138
138
  identificationVerificationStatus => { },
139
139
  identifiedBy => { },
140
140
  typeStatus => { },
141
+ # new, ref forum13707
142
+ identifiedByID => { },
143
+ verbatimIdentification => { },
141
144
  },
142
145
  },
143
146
  LivingSpecimen => { Struct => \%materialSample },
@@ -189,6 +192,10 @@ my %event = (
189
192
  recordNumber => { },
190
193
  reproductiveCondition => { },
191
194
  sex => { },
195
+ # new, ref forum13707
196
+ degreeOfEstablishment => { },
197
+ georeferenceVerificationStatus => { },
198
+ recordedByID => { },
192
199
  },
193
200
  },
194
201
  OccurrenceOccurrenceDetails => { Name => 'OccurrenceDetails', Flat => 1 },
@@ -242,6 +249,7 @@ my %event = (
242
249
  relationshipRemarks => { },
243
250
  resourceID => { },
244
251
  resourceRelationshipID => { },
252
+ relationshipOfResourceID => { }, # new, ref forum13707
245
253
  },
246
254
  },
247
255
  Taxon => {
@@ -255,6 +263,7 @@ my %event = (
255
263
  genus => { },
256
264
  higherClassification => { },
257
265
  infraspecificEpithet => { },
266
+ cultivarEpithet => { }, # new, ref forum13707
258
267
  kingdom => { },
259
268
  nameAccordingTo => { },
260
269
  nameAccordingToID => { },
@@ -338,6 +347,8 @@ my %event = (
338
347
  verbatimLongitude => { },
339
348
  verbatimSRS => { },
340
349
  waterBody => { },
350
+ # new, ref forum13707
351
+ verticalDatum => { },
341
352
  },
342
353
  },
343
354
  );
@@ -56,7 +56,7 @@ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat
56
56
  use Image::ExifTool qw(:DataAccess :Utils);
57
57
  use Image::ExifTool::MakerNotes;
58
58
 
59
- $VERSION = '4.39';
59
+ $VERSION = '4.40';
60
60
 
61
61
  sub ProcessExif($$$);
62
62
  sub WriteExif($$$);
@@ -3397,6 +3397,15 @@ my %opcodeInfo = (
3397
3397
  },
3398
3398
  # the DJI FC2103 writes some interesting stuff here (with sections labelled
3399
3399
  # awb_dbg_info, ae_dbg_info, ae_histogram_info, af_dbg_info, hiso, xidiri) - PH
3400
+ {
3401
+ Name => 'MakerNoteDJIInfo',
3402
+ Condition => '$$valPt =~ /^\[ae_dbg_info:/',
3403
+ MakerNotes => 1,
3404
+ Binary => 1,
3405
+ WriteGroup => 'IFD0', # (for Validate)
3406
+ SubDirectory => { TagTable => 'Image::ExifTool::DJI::Info' },
3407
+ Format => 'undef',
3408
+ },
3400
3409
  {
3401
3410
  Name => 'DNGPrivateData',
3402
3411
  Flags => [ 'Binary', 'Protected' ],
@@ -6605,7 +6614,7 @@ sub ProcessExif($$$)
6605
6614
  #### eval Validate ($val, $dirData, $subdirStart, $size)
6606
6615
  my $ok = 0;
6607
6616
  if (defined $$subdir{Validate} and not eval $$subdir{Validate}) {
6608
- $et->Warn("Invalid $tagStr data");
6617
+ $et->Warn("Invalid $tagStr data", $inMakerNotes);
6609
6618
  $invalid = 1;
6610
6619
  } else {
6611
6620
  if (not $subdirInfo{DirName} and $inMakerNotes) {
@@ -21,7 +21,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
21
21
  use Image::ExifTool::Exif;
22
22
  use Image::ExifTool::ASF; # for GetGUID()
23
23
 
24
- $VERSION = '1.39';
24
+ $VERSION = '1.40';
25
25
 
26
26
  sub ProcessFPX($$);
27
27
  sub ProcessFPXR($$$);
@@ -467,6 +467,19 @@ my %fpxFileType = (
467
467
  ByteOrder => 'BigEndian',
468
468
  },
469
469
  },
470
+ # recognize Autodesk Revit files by looking at BasicFileInfo
471
+ # (but don't yet support reading their metatdata)
472
+ BasicFileInfo => {
473
+ Name => 'BasicFileInfo',
474
+ Binary => 1,
475
+ RawConv => q{
476
+ $val =~ tr/\0//d; # brute force conversion to ASCII
477
+ if ($val =~ /\.(rfa|rft|rte|rvt)/) {
478
+ $self->OverrideFileType(uc($1), "application/$1", $1);
479
+ }
480
+ return $val;
481
+ },
482
+ },
470
483
  );
471
484
 
472
485
  # Summary Information properties
@@ -31,7 +31,7 @@ use vars qw($VERSION);
31
31
  use Image::ExifTool qw(:DataAccess :Utils);
32
32
  use Image::ExifTool::Exif;
33
33
 
34
- $VERSION = '1.80';
34
+ $VERSION = '1.81';
35
35
 
36
36
  sub ProcessFujiDir($$$);
37
37
  sub ProcessFaceRec($$$);
@@ -689,8 +689,9 @@ my %faceCategories = (
689
689
  PrintConv => [{
690
690
  0 => 'None',
691
691
  1 => 'Optical', #PH
692
- 2 => 'Sensor-shift', #PH
692
+ 2 => 'Sensor-shift', #PH (now IBIS/OIS, ref forum13708)
693
693
  3 => 'OIS Lens', #forum9815 (optical+sensor?)
694
+ 258 => 'IBIS/OIS + DIS', #forum13708 (digital on top of IBIS/OIS)
694
695
  512 => 'Digital', #PH
695
696
  },{
696
697
  0 => 'Off',
@@ -841,6 +842,24 @@ my %faceCategories = (
841
842
  1 => 'Face',
842
843
  2 => 'Left Eye',
843
844
  3 => 'Right Eye',
845
+ 7 => 'Body',
846
+ 8 => 'Head',
847
+ 11 => 'Bike',
848
+ 12 => 'Body of Car',
849
+ 13 => 'Front of Car',
850
+ 14 => 'Animal Body',
851
+ 15 => 'Animal Head',
852
+ 16 => 'Animal Face',
853
+ 17 => 'Animal Left Eye',
854
+ 18 => 'Animal Right Eye',
855
+ 19 => 'Bird Body',
856
+ 20 => 'Bird Head',
857
+ 21 => 'Bird Left Eye',
858
+ 22 => 'Bird Right Eye',
859
+ 23 => 'Aircraft Body',
860
+ 25 => 'Aircraft Cockpit',
861
+ 26 => 'Train Front',
862
+ 27 => 'Train Cockpit',
844
863
  },'REPEAT'],
845
864
  },
846
865
  # 0x4202 int8u[-1] - number of cooredinates in each rectangle? (ref 11)
@@ -14,6 +14,7 @@
14
14
  # 2019/07/02 - PH Added ability to read IMU CSV files
15
15
  # 2019/11/10 - PH Also write pitch to CameraElevationAngle
16
16
  # 2020/12/01 - PH Added ability to read DJI CSV log files
17
+ # 2022/06/21 - PH Added ability to read Google Takeout JSON files
17
18
  #
18
19
  # References: 1) http://www.topografix.com/GPX/1/1/
19
20
  # 2) http://www.gpsinformation.org/dale/nmea.htm#GSA
@@ -28,7 +29,7 @@ use vars qw($VERSION);
28
29
  use Image::ExifTool qw(:Public);
29
30
  use Image::ExifTool::GPS;
30
31
 
31
- $VERSION = '1.66';
32
+ $VERSION = '1.68';
32
33
 
33
34
  sub JITTER() { return 2 } # maximum time jitter
34
35
 
@@ -133,7 +134,7 @@ sub LoadTrackLog($$;$)
133
134
  local ($_, $/, *EXIFTOOL_TRKFILE);
134
135
  my ($et, $val) = @_;
135
136
  my ($raf, $from, $time, $isDate, $noDate, $noDateChanged, $lastDate, $dateFlarm);
136
- my ($nmeaStart, $fixSecs, @fixTimes, $lastFix, %nmea, @csvHeadings);
137
+ my ($nmeaStart, $fixSecs, @fixTimes, $lastFix, %nmea, @csvHeadings, $sortFixes);
137
138
  my ($canCut, $cutPDOP, $cutHDOP, $cutSats, $e0, $e1, @tmp, $trackFile, $trackTime);
138
139
 
139
140
  unless (eval { require Time::Local }) {
@@ -285,6 +286,10 @@ sub LoadTrackLog($$;$)
285
286
  }
286
287
  }
287
288
  next;
289
+ } elsif (/"(timelineObjects|placeVisit|activitySegment|latitudeE7)":/) {
290
+ # Google Takeout JSON format
291
+ $format = 'JSON';
292
+ $sortFixes = 1; # (fixes are not all in order for this format)
288
293
  } else {
289
294
  # search only first 50 lines of file for a valid fix
290
295
  last if ++$skipped > 50;
@@ -506,6 +511,19 @@ DoneFix: $isDate = 1;
506
511
  goto DoneFix;
507
512
  }
508
513
  next;
514
+ } elsif ($format eq 'JSON') {
515
+ # Google Takeout JSON format
516
+ if (/"(latitudeE7|longitudeE7|latE7|lngE7|timestamp)":\s*"?(.*?)"?,?\s*[\x0d\x0a]/) {
517
+ if ($1 eq 'timestamp') {
518
+ $time = GetTime($2);
519
+ goto DoneFix if $time and $$fix{lat} and $$fix{lon};
520
+ } elsif ($1 eq 'latitudeE7' or $1 eq 'latE7') {
521
+ $$fix{lat} = $2 * 1e-7;
522
+ } else {
523
+ $$fix{lon} = $2 * 1e-7;
524
+ }
525
+ }
526
+ next;
509
527
  }
510
528
  my (%fix, $secs, $date, $nmea);
511
529
  if ($format eq 'NMEA') {
@@ -751,6 +769,8 @@ DoneFix: $isDate = 1;
751
769
  $numPoints -= $cutHDOP;
752
770
  $numPoints -= $cutSats;
753
771
  }
772
+ # sort fixes if necessary
773
+ @fixTimes = sort { $a <=> $b } @fixTimes if $sortFixes;
754
774
  # mark first fix of the track
755
775
  while (@fixTimes) {
756
776
  $fix = $$points{$fixTimes[0]} or shift(@fixTimes), next;
@@ -1409,8 +1429,8 @@ This module is used by Image::ExifTool
1409
1429
  This module loads GPS track logs, interpolates to determine position based
1410
1430
  on time, and sets new GPS values for geotagging images. Currently supported
1411
1431
  formats are GPX, NMEA RMC/GGA/GLL, KML, IGC, Garmin XML and TCX, Magellan
1412
- PMGNTRK, Honeywell PTNTHPR, Winplus Beacon text, IMU CSV, DJI CSV, and
1413
- Bramor gEO log files.
1432
+ PMGNTRK, Honeywell PTNTHPR, Bramor gEO, Winplus Beacon text, Google Takeout
1433
+ JSON, GPS/IMU CSV, DJI CSV, ExifTool CSV log files.
1414
1434
 
1415
1435
  Methods in this module should not be called directly. Instead, the Geotag
1416
1436
  feature is accessed by writing the values of the ExifTool Geotag, Geosync
@@ -25,7 +25,7 @@ use strict;
25
25
  use vars qw($VERSION);
26
26
  use Image::ExifTool qw(:DataAccess :Utils);
27
27
 
28
- $VERSION = '1.38';
28
+ $VERSION = '1.39';
29
29
 
30
30
  sub ProcessICC($$);
31
31
  sub ProcessICC_Profile($$$);
@@ -522,11 +522,11 @@ my %manuSig = ( #6
522
522
  prmg => 'Perceptual Reference Medium Gamut',
523
523
  },
524
524
  },
525
- meta => { #5 (EVENTUALLY DECODE THIS ONCE WE HAVE A SAMPLE!!)
525
+ meta => { #5
526
526
  Name => 'Metadata',
527
527
  SubDirectory => {
528
528
  TagTable => 'Image::ExifTool::ICC_Profile::Metadata',
529
- Validate => '$type eq "meta"',
529
+ Validate => '$type eq "dict"',
530
530
  },
531
531
  },
532
532
 
@@ -891,6 +891,7 @@ my %manuSig = ( #6
891
891
  ManufacturerName => { },
892
892
  MediaColor => { },
893
893
  MediaWeight => { },
894
+ CreatorApp => { },
894
895
  );
895
896
 
896
897
  #------------------------------------------------------------------------------
@@ -1000,7 +1001,7 @@ sub FormatICCTag($$$)
1000
1001
  }
1001
1002
 
1002
1003
  #------------------------------------------------------------------------------
1003
- # Process ICC metadata record (ref 5) (UNTESTED!)
1004
+ # Process ICC metadata record (ref 5)
1004
1005
  # Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) tag table ref
1005
1006
  # Returns: 1 on success
1006
1007
  sub ProcessMetadata($$$)
@@ -1032,7 +1033,7 @@ sub ProcessMetadata($$$)
1032
1033
  my $namePtr = Get32u($dataPt, $entry);
1033
1034
  my $nameLen = Get32u($dataPt, $entry + 4);
1034
1035
  my $valuePtr = Get32u($dataPt, $entry + 8);
1035
- my $valueLen = Get32u($dataPt, $entry + 16);
1036
+ my $valueLen = Get32u($dataPt, $entry + 12);
1036
1037
  next unless $namePtr and $valuePtr; # ignore if offsets are zero
1037
1038
  if ($namePtr < $minPtr or $namePtr + $nameLen > $dirLen or
1038
1039
  $valuePtr < $minPtr or $valuePtr + $valueLen > $dirLen)
@@ -1040,8 +1041,8 @@ sub ProcessMetadata($$$)
1040
1041
  $et->Warn('Corrupted ICC meta dictionary');
1041
1042
  last;
1042
1043
  }
1043
- my $tag = substr($dataPt, $dirStart + $namePtr, $nameLen);
1044
- my $val = substr($dataPt, $dirStart + $valuePtr, $valueLen);
1044
+ my $tag = substr($$dataPt, $dirStart + $namePtr, $nameLen);
1045
+ my $val = substr($$dataPt, $dirStart + $valuePtr, $valueLen);
1045
1046
  $tag = $et->Decode($tag, 'UTF16', 'MM', 'UTF8');
1046
1047
  $val = $et->Decode($val, 'UTF16', 'MM');
1047
1048
  # generate tagInfo if it doesn't exist
@@ -1050,6 +1051,7 @@ sub ProcessMetadata($$$)
1050
1051
  $name =~ s/\s+(.)/\u$1/g;
1051
1052
  $name =~ tr/-_a-zA-Z0-9//dc;
1052
1053
  next unless length $name;
1054
+ $et->VPrint(0, $$et{INDENT}, "[adding $tag]\n");
1053
1055
  AddTagToTable($tagTablePtr, $tag, { Name => $name });
1054
1056
  }
1055
1057
  $et->HandleTag($tagTablePtr, $tag, $val);
@@ -1312,7 +1314,7 @@ sub ProcessICC_Profile($$$)
1312
1314
  DirName => $name,
1313
1315
  Parent => $$dirInfo{DirName},
1314
1316
  );
1315
- my $type = substr($$dataPt, $valuePtr, 4);
1317
+ my $type = $fmt;
1316
1318
  #### eval Validate ($type)
1317
1319
  if (defined $$subdir{Validate} and not eval $$subdir{Validate}) {
1318
1320
  $et->Warn("Invalid ICC $name data");
@@ -6,7 +6,7 @@
6
6
  # Revisions: 09/12/2005 - P. Harvey Created
7
7
  # 09/08/2020 - PH Added Lyrics3 support
8
8
  #
9
- # References: 1) http://www.id3.org/
9
+ # References: 1) http://www.id3.org/ (now https://id3.org)
10
10
  # 2) http://www.mp3-tech.org/
11
11
  # 3) http://www.fortunecity.com/underworld/sonic/3/id3tag.html
12
12
  # 4) https://id3.org/Lyrics3
@@ -76,9 +76,9 @@ my %dateTimeConv = (
76
76
  OGG, FLAC, APE, MPC and RealAudio files. ID3v2 tags which support multiple
77
77
  languages (eg. Comment and Lyrics) are extracted by specifying the tag name,
78
78
  followed by a dash ('-'), then a 3-character ISO 639-2 language code (eg.
79
- "Comment-spa"). See L<http://www.id3.org/> for the official ID3
80
- specification and L<http://www.loc.gov/standards/iso639-2/php/code_list.php>
81
- for a list of ISO 639-2 language codes.
79
+ "Comment-spa"). See L<https://id3.org/> for the official ID3 specification
80
+ and L<http://www.loc.gov/standards/iso639-2/php/code_list.php> for a list of
81
+ ISO 639-2 language codes.
82
82
  },
83
83
  ID3v1 => {
84
84
  Name => 'ID3v1',
@@ -1661,7 +1661,7 @@ under the same terms as Perl itself.
1661
1661
 
1662
1662
  =over 4
1663
1663
 
1664
- =item L<http://www.id3.org/>
1664
+ =item L<https://id3.org/>
1665
1665
 
1666
1666
  =item L<http://www.mp3-tech.org/>
1667
1667
 
@@ -15,7 +15,7 @@ use strict;
15
15
  use vars qw($VERSION);
16
16
  use Image::ExifTool qw(:DataAccess :Utils);
17
17
 
18
- $VERSION = '1.07';
18
+ $VERSION = '1.08';
19
19
 
20
20
  sub ProcessItemID($$$);
21
21
  sub ProcessLinkInfo($$$);
@@ -273,7 +273,9 @@ sub ProcessLinkInfo($$$);
273
273
  6 => 'Ram Disk',
274
274
  },
275
275
  },
276
- DriveSerialNumber => { },
276
+ DriveSerialNumber => {
277
+ PrintConv => 'join("-", unpack("A4 A4", sprintf("%08X", $val)))',
278
+ },
277
279
  VolumeLabel => { },
278
280
  LocalBasePath => { },
279
281
  CommonNetworkRelLink => { },
@@ -508,6 +510,7 @@ sub ProcessLinkInfo($$$)
508
510
  if ($off + 0x20 <= $dataLen) {
509
511
  # my $len = Get32u($dataPt, $off);
510
512
  $et->HandleTag($tagTablePtr, 'DriveType', undef, %opts, Start=>$off+4);
513
+ $et->HandleTag($tagTablePtr, 'DriveSerialNumber', undef, %opts, Start=>$off+8);
511
514
  $pos = Get32u($dataPt, $off + 0x0c);
512
515
  if ($pos == 0x14) {
513
516
  # use VolumeLabelOffsetUnicode instead
@@ -12,7 +12,7 @@ use strict;
12
12
  use vars qw($VERSION);
13
13
  use Image::ExifTool qw(:DataAccess :Utils);
14
14
 
15
- $VERSION = '1.11';
15
+ $VERSION = '1.12';
16
16
 
17
17
  sub MDItemLocalTime($);
18
18
  sub ProcessATTR($$$);
@@ -381,7 +381,7 @@ sub SetMacOSTags($$$)
381
381
  $val = Image::ExifTool::ConvertUnixTime($time, 1) if $time;
382
382
  }
383
383
  $val =~ s{(\d{4}):(\d{2}):(\d{2})}{$2/$3/$1}; # reformat for setfile
384
- $cmd = "setfile -d '${val}' '${f}'";
384
+ $cmd = "/usr/bin/setfile -d '${val}' '${f}'";
385
385
  } elsif ($tag eq 'MDItemUserTags') {
386
386
  # (tested with "tag" version 0.9.0)
387
387
  ($f = $file) =~ s/'/'\\''/g;
@@ -391,7 +391,7 @@ sub SetMacOSTags($$$)
391
391
  my @dels = @{$$nvHash{DelValue}};
392
392
  s/'/'\\''/g foreach @dels;
393
393
  my $del = join ',', @dels;
394
- $err = system "tag -r '${del}' '${f}'>/dev/null 2>&1";
394
+ $err = system "/usr/local/bin/tag -r '${del}' '${f}'>/dev/null 2>&1";
395
395
  unless ($err) {
396
396
  $et->VerboseValue("- $tag", $del);
397
397
  $result = 1;
@@ -403,13 +403,13 @@ sub SetMacOSTags($$$)
403
403
  s/'/'\\''/g foreach @vals;
404
404
  my $opt = $overwrite > 0 ? '-s' : '-a';
405
405
  $val = @vals ? join(',', @vals) : '';
406
- $cmd = "tag $opt '${val}' '${f}'";
406
+ $cmd = "/usr/local/bin/tag $opt '${val}' '${f}'";
407
407
  $et->VPrint(1," - $tag = (all)\n") if $overwrite > 0;
408
408
  undef $val if $val eq '';
409
409
  }
410
410
  } elsif ($tag eq 'XAttrQuarantine') {
411
411
  ($f = $file) =~ s/'/'\\''/g;
412
- $cmd = "xattr -d com.apple.quarantine '${f}'";
412
+ $cmd = "/usr/bin/xattr -d com.apple.quarantine '${f}'";
413
413
  $silentErr = 256; # (will get this error if attribute doesn't exist)
414
414
  } else {
415
415
  ($f = $file) =~ s/(["\\])/\\$1/g; # escape necessary characters for script
@@ -426,7 +426,7 @@ sub SetMacOSTags($$$)
426
426
  $v = $val ? 8 - $val : 0; # convert from label to label index (0 for no label)
427
427
  $attr = 'label index';
428
428
  }
429
- $cmd = qq(osascript -e 'set fp to POSIX file "$f" as alias' -e \\
429
+ $cmd = qq(/usr/bin/osascript -e 'set fp to POSIX file "$f" as alias' -e \\
430
430
  'tell application "Finder" to set $attr of file fp to "$v"');
431
431
  }
432
432
  if (defined $cmd) {
@@ -455,7 +455,7 @@ sub ExtractMDItemTags($$)
455
455
 
456
456
  ($fn = $file) =~ s/([`"\$\\])/\\$1/g; # escape necessary characters
457
457
  $et->VPrint(0, '(running mdls)');
458
- my @mdls = `mdls "$fn" 2> /dev/null`; # get MacOS metadata
458
+ my @mdls = `/usr/bin/mdls "$fn" 2> /dev/null`; # get MacOS metadata
459
459
  if ($? or not @mdls) {
460
460
  $et->Warn('Error running "mdls" to extract MDItem tags');
461
461
  return;
@@ -565,7 +565,7 @@ sub ExtractXAttrTags($$)
565
565
 
566
566
  ($fn = $file) =~ s/([`"\$\\])/\\$1/g; # escape necessary characters
567
567
  $et->VPrint(0, '(running xattr)');
568
- my @xattr = `xattr -lx "$fn" 2> /dev/null`; # get MacOS extended attributes
568
+ my @xattr = `/usr/bin/xattr -lx "$fn" 2> /dev/null`; # get MacOS extended attributes
569
569
  if ($? or not @xattr) {
570
570
  $? and $et->Warn('Error running "xattr" to extract XAttr tags');
571
571
  return;
@@ -611,7 +611,7 @@ sub GetFileCreateDate($$)
611
611
 
612
612
  ($fn = $file) =~ s/([`"\$\\])/\\$1/g; # escape necessary characters
613
613
  $et->VPrint(0, '(running stat)');
614
- my $time = `stat -f '%SB' -t '%Y:%m:%d %H:%M:%S%z' "$fn" 2> /dev/null`;
614
+ my $time = `/usr/bin/stat -f '%SB' -t '%Y:%m:%d %H:%M:%S%z' "$fn" 2> /dev/null`;
615
615
  if ($? or not $time or $time !~ s/([-+]\d{2})(\d{2})\s*$/$1:$2/) {
616
616
  $et->Warn('Error running "stat" to extract FileCreateDate');
617
617
  return;
@@ -21,7 +21,7 @@ sub ProcessKodakPatch($$$);
21
21
  sub WriteUnknownOrPreview($$$);
22
22
  sub FixLeicaBase($$;$);
23
23
 
24
- $VERSION = '2.10';
24
+ $VERSION = '2.11';
25
25
 
26
26
  my $debug; # set to 1 to enable debugging code
27
27
 
@@ -89,6 +89,11 @@ my $debug; # set to 1 to enable debugging code
89
89
  FixBase => 1, # necessary for AVI and MOV videos
90
90
  },
91
91
  },
92
+ {
93
+ Name => 'MakerNoteDJIInfo',
94
+ Condition => '$$valPt =~ /^\[ae_dbg_info:/',
95
+ SubDirectory => { TagTable => 'Image::ExifTool::DJI::Info' },
96
+ },
92
97
  {
93
98
  Name => 'MakerNoteDJI',
94
99
  Condition => '$$self{Make} eq "DJI" and $$valPt !~ /^...\@AMBA/s',
@@ -570,6 +575,17 @@ my $debug; # set to 1 to enable debugging code
570
575
  ByteOrder => 'Unknown',
571
576
  },
572
577
  },
578
+ {
579
+ Name => 'MakerNoteOlympus3',
580
+ # new Olympus maker notes start with "OLYMPUS\0"
581
+ Condition => '$$valPt =~ /^OM SYSTEM\0/',
582
+ SubDirectory => {
583
+ TagTable => 'Image::ExifTool::Olympus::Main',
584
+ Start => '$valuePtr + 16',
585
+ Base => '$start - 16',
586
+ ByteOrder => 'Unknown',
587
+ },
588
+ },
573
589
  {
574
590
  Name => 'MakerNoteLeica',
575
591
  # (starts with "LEICA\0\0\0")
@@ -63,7 +63,7 @@ use Image::ExifTool::Exif;
63
63
  use Image::ExifTool::GPS;
64
64
  use Image::ExifTool::XMP;
65
65
 
66
- $VERSION = '4.05';
66
+ $VERSION = '4.07';
67
67
 
68
68
  sub LensIDConv($$$);
69
69
  sub ProcessNikonAVI($$$);
@@ -437,6 +437,7 @@ sub GetAFPointGrid($$;$);
437
437
  'A5 40 2D 88 2C 40 4B 0E' => 'Sigma 18-250mm F3.5-6.3 DC OS HSM',
438
438
  # LensFStops varies with FocalLength for this lens (ref 2):
439
439
  '92 2C 2D 88 2C 40 4B 0E' => 'Sigma 18-250mm F3.5-6.3 DC Macro OS HSM', #2
440
+ '87 2C 2D 8E 2C 40 4B 0E' => 'Sigma 18-300mm F3.5-6.3 DC Macro HSM', #30
440
441
  # '92 2C 2D 88 2C 40 4B 0E' (250mm)
441
442
  # '92 2B 2D 88 2C 40 4B 0E' (210mm)
442
443
  # '92 2C 2D 88 2C 40 4B 0E' (185mm)
@@ -605,6 +606,7 @@ sub GetAFPointGrid($$;$);
605
606
  'CC 44 68 98 34 41 DF 0E' => 'Tamron 100-400mm f/4.5-6.3 Di VC USD', #30
606
607
  'EB 40 76 A6 38 40 DF 0E' => 'Tamron SP AF 150-600mm f/5-6.3 VC USD (A011)',
607
608
  'E3 40 76 A6 38 40 DF 4E' => 'Tamron SP 150-600mm f/5-6.3 Di VC USD G2', #30
609
+ 'E3 40 76 A6 38 40 DF 0E' => 'Tamron SP 150-600mm f/5-6.3 Di VC USD G2 (A022)', #forum3833
608
610
  '20 3C 80 98 3D 3D 1E 02' => 'Tamron AF 200-400mm f/5.6 LD IF (75D)',
609
611
  '00 3E 80 A0 38 3F 00 02' => 'Tamron SP AF 200-500mm f/5-6.3 Di LD (IF) (A08)',
610
612
  '00 3F 80 A0 38 3F 00 02' => 'Tamron SP AF 200-500mm f/5-6.3 Di (A08)',
@@ -666,6 +668,7 @@ sub GetAFPointGrid($$;$);
666
668
  '00 54 55 55 0C 0C 00 00' => 'Voigtlander Nokton 58mm F1.4 SLII',
667
669
  '00 40 64 64 2C 2C 00 00' => 'Voigtlander APO-Lanthar 90mm F3.5 SLII Close Focus',
668
670
  '07 40 30 45 2D 35 03 02.2' => 'Voigtlander Ultragon 19-35mm F3.5-4.5 VMV', #NJ
671
+ '71 48 64 64 24 24 00 00' => 'Voigtlander APO-Skopar 90mm F2.8 SL IIs', #30
669
672
  #
670
673
  '00 40 2D 2D 2C 2C 00 00' => 'Carl Zeiss Distagon T* 3.5/18 ZF.2',
671
674
  '00 48 27 27 24 24 00 00' => 'Carl Zeiss Distagon T* 2.8/15 ZF.2', #MykytaKozlov
@@ -4024,7 +4027,7 @@ my %base64coord = (
4024
4027
  },
4025
4028
  Format => 'int16u',
4026
4029
  },
4027
- 0x2f => { #28 (Z7) Still photography range 1-17 for the 493 point Z7 (arranged in a 29x17 grid. Center at x=16, y=10).
4030
+ 0x2f => { #28 (Z7) Still photography range 1-17 for the 493 point Z7 (arranged in a 29x17 grid. Center at x=16, y=10).
4028
4031
  Name => 'AFFocusPointXPosition',
4029
4032
  Condition => q{
4030
4033
  $$self{ContrastDetectAF} == 2 and $$self{AFInfo2Version} =~ /^03/ or
@@ -4192,11 +4195,19 @@ my %base64coord = (
4192
4195
  },
4193
4196
  0x43 => {
4194
4197
  Name => 'FocusPositionHorizontal',
4195
- PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 29 ); }, #493 focus points for Z9 fall in a 30x18 grid (some coordinates are not accessible)
4198
+ Notes => q{
4199
+ the focus points form a 29x17 grid, but the X,Y coordinate values run from 1,1
4200
+ to 30,19. The horizontal coordinate 11R (5) and the vertical coordinates 6U
4201
+ (4) and 2D (12) are not used for some reason
4202
+ },
4203
+ # 493 focus points for Z9 fall in a 30x19 grid
4204
+ # (the 11R (5) position is not used, for a total of 29 columns, ref AlbertShan email)
4205
+ PrintConv => sub { my ($val) = @_; PrintAFPointsLeftRight($val, 29); },
4196
4206
  },
4197
4207
  0x45 => {
4198
4208
  Name => 'FocusPositionVertical',
4199
- PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 17 ); },
4209
+ # (the 6U (4) and 2D (12) are not used, for a total of 17 rows, ref AlbertShan email)
4210
+ PrintConv => sub { my ($val) = @_; PrintAFPointsUpDown($val, 17); },
4200
4211
  },
4201
4212
  0x46 => {
4202
4213
  Name => 'AFAreaWidth',
@@ -8585,6 +8596,8 @@ my %nikonFocalConversions = (
8585
8596
  4 => 'Wide (L)',
8586
8597
  5 => '3D',
8587
8598
  6 => 'Auto',
8599
+ 12 => 'Wide (C1)',
8600
+ 13 => 'Wide (C2)',
8588
8601
  },
8589
8602
  },
8590
8603
  530 => { Name => 'VRMode', PrintConv => \%vRModeZ9},
@@ -8655,6 +8668,8 @@ my %nikonFocalConversions = (
8655
8668
  2 => 'H.265 8-bit (MOV)',
8656
8669
  3 => 'H.265 10-bit (MOV)',
8657
8670
  4 => 'ProRes 422 HQ 10-bit (MOV)',
8671
+ 5 => 'ProRes RAW HQ 12-bit (MOV)',
8672
+ 6 => 'NRAW 12-bit (NEV)'
8658
8673
  },
8659
8674
  },
8660
8675
  616 => {
@@ -11310,7 +11325,7 @@ sub PrintAFPointsGridInv($$$)
11310
11325
  #------------------------------------------------------------------------------
11311
11326
  # Print conversion for relative Left/Right AF points (ref 28)
11312
11327
  # Inputs: 0) column, 1) number of columns
11313
- # Returns: AF point data as a string (e.g. '2L' or 'C' or '3R')
11328
+ # Returns: AF point data as a string (e.g. '2L of Center' or 'C' or '3R of Center')
11314
11329
  sub PrintAFPointsLeftRight($$)
11315
11330
  {
11316
11331
  my ($col, $ncol) = @_;
@@ -11323,7 +11338,7 @@ sub PrintAFPointsLeftRight($$)
11323
11338
  #------------------------------------------------------------------------------
11324
11339
  # Print conversion for relative Up/Down AF points (ref 28)
11325
11340
  # Inputs: 0) row, 1) number of rows
11326
- # Returns: AF point data as a string (e.g. '2U' or 'C' or '3D')
11341
+ # Returns: AF point data as a string (e.g. '2U from Center' or 'C' or '3D from Center')
11327
11342
  sub PrintAFPointsUpDown($$)
11328
11343
  {
11329
11344
  my ($row, $nrow) = @_;
@@ -15,7 +15,7 @@ package Image::ExifTool::NikonCustom;
15
15
  use strict;
16
16
  use vars qw($VERSION);
17
17
 
18
- $VERSION = '1.19';
18
+ $VERSION = '1.20';
19
19
 
20
20
  my %buttonsZ9= (
21
21
  0 => 'None',
@@ -74,6 +74,9 @@ my %buttonsZ9= (
74
74
  82 => 'Select To Send (PC)',
75
75
  83 => 'Select To Send (FTP)',
76
76
  85 => 'Control Lock',
77
+ 86 => 'Save Focus Position',
78
+ 87 => 'Recall Focus Position',
79
+ 88 => 'Recall Shooting Functions (Hold)',
77
80
  );
78
81
  my %dialsZ9 = (
79
82
  0 => '1 Frame',
@@ -40,7 +40,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
40
40
  use Image::ExifTool::Exif;
41
41
  use Image::ExifTool::APP12;
42
42
 
43
- $VERSION = '2.76';
43
+ $VERSION = '2.78';
44
44
 
45
45
  sub PrintLensInfo($$$);
46
46
 
@@ -432,6 +432,7 @@ my %olympusCameraTypes = (
432
432
  S0089 => 'E-M5MarkIII',
433
433
  S0092 => 'E-M1MarkIII', #IB
434
434
  S0093 => 'E-P7', #IB
435
+ S0095 => 'OM-1', #IB
435
436
  SR45 => 'D220',
436
437
  SR55 => 'D320L',
437
438
  SR83 => 'D340L',
@@ -1910,6 +1911,23 @@ my %indexInfo = (
1910
1911
  Name => 'FocusBracketStepSize',
1911
1912
  Writable => 'int8u',
1912
1913
  },
1914
+ 0x309 => { #forum13341
1915
+ Name => 'AISubjectTrackingMode',
1916
+ Writable => 'int16u',
1917
+ ValueConv => '($val >> 8) . " " . ($val & 0xff)',
1918
+ ValueConvInv => 'my @a = split " ", $val; $val = $a[0]*256 + $a[1]',
1919
+ PrintConv => [{
1920
+ 0 => 'Off',
1921
+ 1 => 'Motorsports',
1922
+ 2 => 'Airplanes',
1923
+ 3 => 'Trains',
1924
+ 4 => 'Birds',
1925
+ 5 => 'Dogs & Cats',
1926
+ },{
1927
+ 0 => 'Object Not Found',
1928
+ 1 => 'Object Found',
1929
+ }],
1930
+ },
1913
1931
  0x400 => { #6
1914
1932
  Name => 'FlashMode',
1915
1933
  Writable => 'int16u',
@@ -2537,11 +2555,13 @@ my %indexInfo = (
2537
2555
  '3 8' => 'ND8 (3EV)', #IB
2538
2556
  '3 16' => 'ND16 (4EV)', #IB
2539
2557
  '3 32' => 'ND32 (5EV)', #IB
2558
+ '3 64' => 'ND64 (6EV)', #forum13341
2540
2559
  '5 4' => 'HDR1', #forum8906
2541
2560
  '6 4' => 'HDR2', #forum8906
2542
2561
  '8 8' => 'Tripod high resolution', #IB
2543
2562
  '9 *' => 'Focus-stacked (* images)', #IB (* = 2-15)
2544
- '11 16' => 'Hand-held high resolution', #IB (perhaps '11 15' would be possible, ref 24)
2563
+ '11 12' => 'Hand-held high resolution (11 12)', #forum13341 (OM-1)
2564
+ '11 16' => 'Hand-held high resolution (11 16)', #IB (perhaps '11 15' would be possible, ref 24)
2545
2565
  OTHER => sub {
2546
2566
  my ($val, $inv, $conv) = @_;
2547
2567
  if ($inv) {