exiftool-vendored.exe 12.70.0 → 12.72.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 (26) hide show
  1. package/bin/exiftool_files/Changes +36 -1
  2. package/bin/exiftool_files/README +10 -10
  3. package/bin/exiftool_files/exiftool.pl +19 -14
  4. package/bin/exiftool_files/lib/Image/ExifTool/AAC.pm +175 -0
  5. package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +2 -1
  6. package/bin/exiftool_files/lib/Image/ExifTool/Canon.pm +21 -6
  7. package/bin/exiftool_files/lib/Image/ExifTool/Exif.pm +30 -9
  8. package/bin/exiftool_files/lib/Image/ExifTool/FujiFilm.pm +5 -2
  9. package/bin/exiftool_files/lib/Image/ExifTool/GoPro.pm +16 -1
  10. package/bin/exiftool_files/lib/Image/ExifTool/ID3.pm +7 -4
  11. package/bin/exiftool_files/lib/Image/ExifTool/JSON.pm +4 -1
  12. package/bin/exiftool_files/lib/Image/ExifTool/M2TS.pm +21 -16
  13. package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +158 -90
  14. package/bin/exiftool_files/lib/Image/ExifTool/Pentax.pm +15 -6
  15. package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +29 -10
  16. package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +59 -11
  17. package/bin/exiftool_files/lib/Image/ExifTool/Ricoh.pm +109 -1
  18. package/bin/exiftool_files/lib/Image/ExifTool/Samsung.pm +3 -2
  19. package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +83 -4
  20. package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +4862 -4828
  21. package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +147 -42
  22. package/bin/exiftool_files/lib/Image/ExifTool/WriteExif.pl +19 -4
  23. package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +81 -14
  24. package/bin/exiftool_files/lib/Image/ExifTool.pm +18 -6
  25. package/bin/exiftool_files/lib/Image/ExifTool.pod +19 -14
  26. package/package.json +5 -4
@@ -32,7 +32,7 @@ use strict;
32
32
  use vars qw($VERSION);
33
33
  use Image::ExifTool qw(:DataAccess :Utils);
34
34
 
35
- $VERSION = '1.23';
35
+ $VERSION = '1.24';
36
36
 
37
37
  # program map table "stream_type" lookup (ref 6/1/9)
38
38
  my %streamType = (
@@ -354,29 +354,32 @@ sub ParsePID($$$$$)
354
354
  my $tbl = GetTagTable('Image::ExifTool::QuickTime::Stream');
355
355
  Image::ExifTool::QuickTime::ProcessFreeGPS($et, { DataPt => \$dat }, $tbl);
356
356
  $more = 1;
357
- } elsif ($$dataPt =~ /^A([NS])([EW])\0/s) {
358
- # INNOVV TS video (same format is INNOVV MP4)
357
+ } elsif ($$dataPt =~ /^(V00|A([NS])([EW]))\0/s) {
358
+ # INNOVV TS video (same format as INNOVV MP4)
359
359
  SetByteOrder('II');
360
360
  my $tagTbl = GetTagTable('Image::ExifTool::QuickTime::Stream');
361
- while ($$dataPt =~ /(A[NS][EW]\0.{28})/g) {
361
+ while ($$dataPt =~ /((V00|A[NS][EW])\0.{28})/g) {
362
362
  my $dat = $1;
363
- my $lat = abs(GetFloat(\$dat, 4)); # (abs just to be safe)
364
- my $lon = abs(GetFloat(\$dat, 8)); # (abs just to be safe)
365
- my $spd = GetFloat(\$dat, 12) * $knotsToKph;
366
- my $trk = GetFloat(\$dat, 16);
363
+ $$et{DOC_NUM} = ++$$et{DOC_COUNT};
364
+ if ($2 ne 'V00') {
365
+ my $lat = abs(GetFloat(\$dat, 4)); # (abs just to be safe)
366
+ my $lon = abs(GetFloat(\$dat, 8)); # (abs just to be safe)
367
+ my $spd = GetFloat(\$dat, 12) * $knotsToKph;
368
+ my $trk = GetFloat(\$dat, 16);
369
+ Image::ExifTool::QuickTime::ConvertLatLon($lat, $lon);
370
+ $et->HandleTag($tagTbl, GPSLatitude => abs($lat) * (substr($dat,1,1) eq 'S' ? -1 : 1));
371
+ $et->HandleTag($tagTbl, GPSLongitude => abs($lon) * (substr($dat,2,1) eq 'W' ? -1 : 1));
372
+ $et->HandleTag($tagTbl, GPSSpeed => $spd);
373
+ $et->HandleTag($tagTbl, GPSSpeedRef => 'K');
374
+ $et->HandleTag($tagTbl, GPSTrack => $trk);
375
+ $et->HandleTag($tagTbl, GPSTrackRef => 'T');
376
+ }
367
377
  my @acc = unpack('x20V3', $dat);
368
378
  map { $_ = $_ - 4294967296 if $_ >= 0x80000000 } @acc;
369
- Image::ExifTool::QuickTime::ConvertLatLon($lat, $lon);
370
- $$et{DOC_NUM} = ++$$et{DOC_COUNT};
371
- $et->HandleTag($tagTbl, GPSLatitude => abs($lat) * (substr($dat,1,1) eq 'S' ? -1 : 1));
372
- $et->HandleTag($tagTbl, GPSLongitude => abs($lon) * (substr($dat,2,1) eq 'W' ? -1 : 1));
373
- $et->HandleTag($tagTbl, GPSSpeed => $spd);
374
- $et->HandleTag($tagTbl, GPSSpeedRef => 'K');
375
- $et->HandleTag($tagTbl, GPSTrack => $trk);
376
- $et->HandleTag($tagTbl, GPSTrackRef => 'T');
377
379
  $et->HandleTag($tagTbl, Accelerometer => "@acc");
378
380
  }
379
381
  SetByteOrder('MM');
382
+ $$et{HasINNOV} = 1; # (necessary to skip over empty/unknown INNOV records)
380
383
  $more = 1;
381
384
  } elsif ($$dataPt =~ /^\$(GPSINFO|GSNRINFO),/) {
382
385
  # $GPSINFO,0x0004,2021.08.09 13:27:36,2341.54561,12031.70135,8.0,51,153,0,0,\x0d
@@ -478,6 +481,8 @@ sub ParsePID($$$$$)
478
481
  $et->HandleTag($tagTbl, GPSTrackRef => 'T');
479
482
  SetByteOrder('MM');
480
483
  $more = 1;
484
+ } elsif ($$et{HasINNOV}) {
485
+ $more = 1;
481
486
  }
482
487
  delete $$et{DOC_NUM};
483
488
  }
@@ -65,7 +65,7 @@ use Image::ExifTool::Exif;
65
65
  use Image::ExifTool::GPS;
66
66
  use Image::ExifTool::XMP;
67
67
 
68
- $VERSION = '4.27';
68
+ $VERSION = '4.28';
69
69
 
70
70
  sub LensIDConv($$$);
71
71
  sub ProcessNikonAVI($$$);
@@ -949,6 +949,15 @@ my %highFrameRateZ9 = (
949
949
  4 => 'C120',
950
950
  );
951
951
 
952
+ my %imageAreaD6 = (
953
+ 0 => 'FX (36x24)',
954
+ 1 => 'DX (24x16)',
955
+ 2 => '5:4 (30x24)',
956
+ 3 => '1.2x (30x20)',
957
+ 4 => '1:1 (24x24)',
958
+ 6 => '16:9',
959
+ );
960
+
952
961
  my %imageAreaZ9 = (
953
962
  0 => 'FX',
954
963
  1 => 'DX',
@@ -1987,7 +1996,7 @@ my %base64coord = (
1987
1996
  },
1988
1997
  0x0044 => { #28
1989
1998
  Name => 'JPGCompression',
1990
- RawConv => '($val) ? $val : undef', # undef for raw files
1999
+ RawConv => '($val) ? $val : undef', # undef for raw files
1991
2000
  PrintConv => {
1992
2001
  1 => 'Size Priority',
1993
2002
  3 => 'Optimal Quality',
@@ -5933,9 +5942,9 @@ my %nikonFocalConversions = (
5933
5942
  0x10 => { #28
5934
5943
  Name => 'ImageArea',
5935
5944
  PrintConv => {
5936
- 0 => 'FX (36.0 x 23.9 mm)',
5937
- 1 => 'DX (23.5 x 15.6 mm)',
5938
- 2 => '5:4 (30.0 x 23.9 mm)',
5945
+ 0 => 'FX (36x24)',
5946
+ 1 => 'DX (24x16)',
5947
+ 2 => '5:4 (30x24)',
5939
5948
  },
5940
5949
  },
5941
5950
  0x25d => {
@@ -7328,6 +7337,10 @@ my %nikonFocalConversions = (
7328
7337
  Format => 'int16u',
7329
7338
  Hidden => 1,
7330
7339
  },
7340
+ 0x2b => {
7341
+ Name => 'ImageArea',
7342
+ PrintConv => \%imageAreaD6,
7343
+ },
7331
7344
  );
7332
7345
 
7333
7346
  %Image::ExifTool::Nikon::IntervalInfoD6 = (
@@ -8319,6 +8332,10 @@ my %nikonFocalConversions = (
8319
8332
  Format => 'int16u',
8320
8333
  Hidden => 1,
8321
8334
  },
8335
+ 0x2b => {
8336
+ Name => 'ImageArea',
8337
+ PrintConv => \%imageAreaD6,
8338
+ },
8322
8339
  );
8323
8340
 
8324
8341
  %Image::ExifTool::Nikon::PortraitInfoZ7II = (
@@ -8519,8 +8536,8 @@ my %nikonFocalConversions = (
8519
8536
  %binaryDataAttrs,
8520
8537
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8521
8538
  DATAMEMBER => [ 0x20, 0x28, 0x2a ],
8522
- #0x0019 => HDRFrame # For JPG 0=> Not HDR; 1=> file is the blended exposure. For raw files: 0=> Not from an HDR capture sequence; otherwise frame number in the HDR capture sequence -- 'Save Individual Pictures (RAW)' must be enabled.
8523
- #0x001A => MultipleExposureFrame # For JPG 0=> Not a multiple exposure; 1=> file is the blended exposure. For raw files: 0=> Not a multiple exposure capture; otherwise frame number in the capture sequence -- 'Save Individual Pictures (RAW)' must be enabled.
8539
+ #0x0019 => HDRFrame # For JPG 0=> Not HDR; 1=> file is the blended exposure. For raw files: 0=> Not from an HDR capture sequence; otherwise frame number in the HDR capture sequence -- 'Save Individual Pictures (RAW)' must be enabled.
8540
+ #0x001A => MultipleExposureFrame # For JPG 0=> Not a multiple exposure; 1=> file is the blended exposure. For raw files: 0=> Not a multiple exposure capture; otherwise frame number in the capture sequence -- 'Save Individual Pictures (RAW)' must be enabled.
8524
8541
  0x0020 => {
8525
8542
  Name => 'FocusShiftShooting',
8526
8543
  Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96', #not valid for C30/C60/C120
@@ -8559,24 +8576,18 @@ my %nikonFocalConversions = (
8559
8576
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8560
8577
  DATAMEMBER => [ 0x0bea, 0x0beb ],
8561
8578
  0x0be8 => {
8562
- Name => 'AFAreaInitialXPosition', #stored as a representation of the horizontal position of the center of the portion of the focus box positioned top left when in Wide Area (L/S/C1/C2) focus modes (before subject detection potentially refines focus)
8563
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and defined $$self{AFAreaMode} and $$self{AFAreaMode} < 2 ', #not valid for C30/C60/C120 or for Area Modes 1:1 and 16:19
8579
+ Name => 'AFAreaInitialXPosition', #the horizontal position of the center the focus box prior to any subject detection or tracking. Origin is Top Left.
8580
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96', #not valid for C30/C60/C120
8564
8581
  Format => 'int8s',
8565
8582
  PrintConv => q{
8566
- #in FX mode and Single-point, the 29 horizontal focus points are spaced 259 pixels apart starting at pixel 502 and ending at 7754. Spacing is the same for Wide(L/C1/C2) with different start points.
8567
- #in FX mode and Dynamic(L), the 27 horizontal focus points are spaced 259 pixels apart starting at pixel 761 and ending at 7495
8568
- #in FX mode and Dynamic(M), the 29 horizontal focus points are spaced 259 pixels apart starting at pixel 502 and ending at 7754
8569
- #in DX mode and Single-point, the 19 horizontal focus points are spaced 388 pixels apart starting at pixel 636 and ending at 7620. [These correspond to FX positions and match the corresponding values in AFAreaMode tag AFAreaXPosition].
8570
- #in DX mode and Wide(S), the 17 horizontal focus points are spaced 393 pixels apart starting at pixel 591 and ending at 7272.
8571
- #in DX mode and Dynamic(L), the 17 horizontal focus points are spaced 388 pixels apart starting at pixel 1024 and ending at 7232
8572
- #in DX mode and Dynamic(M), the 19 horizontal focus points are spaced 388 pixels apart starting at pixel 636 and ending at 7620
8573
-
8574
- my $areaMode = $$self{VALUE}{PhotoShootingMenuBankImageArea};
8583
+ my $imageArea = $$self{ImageArea};
8575
8584
  my $afAreaMode = $$self{VALUE}{AFAreaMode};
8576
- my $dynamicAFAreaSize = $$self{VALUE}{DynamicAFAreaSize};
8585
+ my $dynamicAFAreaSize = ( defined $$self{DynamicAFAreaSize} ? $$self{DynamicAFAreaSize} : 0 );
8577
8586
 
8578
- my $FX = 0;
8579
- my $DX = 1;
8587
+ my $FX = 0; #image size 8256 x 5504
8588
+ my $DX = 1; #image size 5392 x 3592
8589
+ my $WideScreen = 4; #16:9 image area, image size 8256x4640
8590
+ my $OneToOne = 8; #1:1 image area, image size 5504x5504
8580
8591
 
8581
8592
  my $Single = 1;
8582
8593
  my $Dynamic = 2;
@@ -8590,54 +8601,51 @@ my %nikonFocalConversions = (
8590
8601
  my $DynamicM = 1;
8591
8602
  my $DynamicL = 2;
8592
8603
 
8593
- my $start = 502; #FX - all flavors
8594
- $start = 636 if $areaMode == $DX and ($afAreaMode == $Dynamic or $afAreaMode == $WideL or $afAreaMode == $ThreeD or $afAreaMode == $Auto or $afAreaMode >= $WideC1); #DX Wide(L/C1/C2) + Dynamic (L/M/S) + 3D + Auto
8595
- $start = 591 if $areaMode == $DX and $afAreaMode == $WideS ; #DX Wide(S)
8604
+ my $start = 502; #FX, 16:9 & 1:1 formats
8605
+ my $increment = 259; #FX, & 16:9 formats
8596
8606
 
8597
- my $increment = 259; #FX - all flavors
8598
- $increment = 388 if $areaMode == $DX and ($afAreaMode == $Dynamic or $afAreaMode == $WideL or $afAreaMode == $ThreeD or $afAreaMode == $Auto or $afAreaMode >= $WideC1); #DX Wide(L/C1/C2) + Dynamic (L/M/S) + 3D + Auto
8599
- $increment = 393 if $areaMode == $DX and $afAreaMode == $WideS ; #DX Wide(S)
8607
+ $start = $start + 5 * $increment if $imageArea == $OneToOne; # need to provide additional offset for the cropped horizontal pixels in 1:1 (19 vs 29 horizontal focus positions)
8608
+ $start = $start - $increment if $val < 49 and ($imageArea == $FX or $imageArea == $WideScreen); #calculations for the left side of the frames are offset by 1 position from the right side
8609
+ $start = $start - $increment if $imageArea == $OneToOne and $afAreaMode == $Auto;
8600
8610
 
8601
- my $divisor = 4;
8602
- $divisor = 6 if $areaMode == $DX ;
8611
+ if ($imageArea == $DX) { # DX results are in FX coordinate system to match reporting of ($AFAreaXPosition , $AFAreaYPosition)
8612
+ $start = 636;
8613
+ $increment = 388;
8614
+ if ( $afAreaMode == $WideS ) { #Wide S focus box width is an unusual size
8615
+ $start = 591;
8616
+ $increment = 393;
8617
+ }
8618
+ $start = $start - $increment if $afAreaMode == $Auto ;
8619
+ }
8620
+
8621
+ my $divisor = 3.99; #subtract .01 to ensure $val of 2n+2 rounds up
8622
+ $divisor = 4.01 if $val >= 50; #...but round up on the right side of the frame
8623
+ $divisor = 6 if $imageArea == $DX or $imageArea == $OneToOne;
8603
8624
 
8604
- my $offsetVal = 0;
8605
- $offsetVal = 12 if $areaMode == $FX and $afAreaMode == $Dynamic ; #FX Dynamic (L/M) - force positive values so perl rounding toward zero isn't an issue
8606
- $offsetVal = 18 if $areaMode == $DX and $afAreaMode == $Dynamic ; #DX Dynamic (L/M)
8625
+ my $roundedValOverDivisor = sprintf("%.0f", $val / $divisor); #round to nearest int
8607
8626
 
8608
- my $offsetSum = -1;
8609
- $offsetSum = -4 if $afAreaMode == $Dynamic ; # Dynamic (L/M)
8627
+ my $focusBoxWidth = $$self{AFAreaInitialWidth} ; #wider focus boxes (e.g., DynM, DynL and some Wide C1/C2) will start and end closer to the center of the frame
8628
+ $focusBoxWidth = int($focusBoxWidth * 2 / 3) if $imageArea == $DX or $imageArea == $OneToOne ;
8610
8629
 
8611
- my $ncol = $$self{AFAreaInitialWidth};
8612
- $ncol = int($ncol * 2 / 3) if $areaMode == $DX ; #DX
8630
+ my $skipPositions = int($focusBoxWidth / 2); #jump over half the width of the focus box
8613
8631
 
8614
- #some sample mappings:
8615
- #FX Wide(S/L/C1/C2) [6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93, 97, 101, 105, 109, 113, 117] to 502, 761, 1020, 1279, 1538, 1797, 2056, 2315, 2574, 2833, 3092, 3351, 3610, 3869, 4128, 4387, 4646, 4905, 5164, 5423, 5682, 5941, 6200, 6459, 6718, 6977, 7236, 7495, 7754]
8616
- #DX Wide(L/C1/C2) map for Wide(L)/C1/C2 [6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 67, 73, 79, 85, 91, 97, 103, 109, 115] to [636, 1024, 1412, 1800, 2188, 2576, 2964, 3352, 3740, 4128, 4516, 4904, 5292, 5680, 6068, 6456, 6844, 7232, 7620]
8617
- #DX Wide(S) for Wide(S) [6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 67, 73, 79, 85, 91, 97, 103] to [984, 1377, 1770, 2163, 2556, 2949, 3342, 3735, 4128, 4521, 4914, 5307, 5700, 6093, 6486, 6879, 7272]
8618
- #FX Dynamic (L) map [-9, -5, -1, 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93] to [761, 1020, 1279, 1538, 1797, 2056, 2315, 2574, 2833, 3092, 3351, 3610, 3869, 4128, 4387, 4646, 4905, 5164, 5423, 5682, 5941, 6200, 6459, 6718, 6977, 7236, 7495]
8632
+ my $result = $start + $increment * ($roundedValOverDivisor + $skipPositions - 1 ) ;
8619
8633
 
8620
- return $start + $increment * (int(($val + $offsetVal) / $divisor) + int($ncol / 2) + $offsetSum) ; #do not use simple int() becuase it rounds negative fractions toward zero resulting in duplicate values - instead use the 10xdivisor to force positive values
8634
+ return $result;
8621
8635
  },
8622
8636
  },
8623
8637
  0x0be9 => {
8624
- Name =>'AFAreaInitialYPosition', #stored as a representation of the vertical position of the center of the portion of the focus box positioned top left when in Wide Area (L/S/C1/C2) focus modes (before subject detection potentially refines focus)
8625
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and defined $$self{AFAreaMode} and $$self{AFAreaMode} < 2', #not valid for C30/C60/C120 or for Area Modes 1:1 and 16:19
8638
+ Name =>'AFAreaInitialYPosition', #the vertical position of the center the focus box prior to any subject detection or tracking. Origin is Top Left.
8639
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96', #not valid for C30/C60/C120 or for Area Modes 1:1 and 16:9
8626
8640
  Format => 'int8s',
8627
8641
  PrintConv => q{
8628
- #in FX mode and Single-point, the 17 vertical focus points are spaced 291 pixels apart starting at pixel 424 and ending at 5080. Spacing is the same for Wide(L/C1/C2)
8629
- #in FX mode and Dynamic(L), the 15 vertical focus points are spaced 291 pixels apart starting at pixel 715 and ending at 4789
8630
- #in FX mode and Dynamic(M), the 17 vertical l focus points are spaced 291 pixels apart starting at pixel 424 and ending at 5080
8631
- #in DX mode and Single-point, the 11 vertical focus points are spaced 436 pixels apart starting at pixel 572 and ending at 4932. [These correspond to FX positions and match the corresponding values in AFAreaMode tag AFAreaYPosition].
8632
- #in DX Mode and Wide(S) the 9 vertical focus points are spaced 442 pixels apart starting at pixel 542 and ending at 4520
8633
- #in DX mode and Dynamic(L), the 9 vertical focus points are spaced 436 pixels apart starting at pixel 1008 and ending at 4496
8634
-
8635
- my $areaMode = $$self{VALUE}{PhotoShootingMenuBankImageArea};
8642
+ my $imageArea = $$self{ImageArea};
8636
8643
  my $afAreaMode = $$self{VALUE}{AFAreaMode};
8637
- my $dynamicAFAreaSize = $$self{VALUE}{DynamicAFAreaSize};
8638
8644
 
8639
- my $FX = 0;
8640
- my $DX = 1;
8645
+ my $FX = 0; #image size 8256 x 5504
8646
+ my $DX = 1; #image size 5392 x 3592
8647
+ my $WideScreen = 4; #16:9 image area, image size 8256x4640
8648
+ my $OneToOne = 8; #1:1 image area, image size 5504x5504
8641
8649
 
8642
8650
  my $Single = 1;
8643
8651
  my $Dynamic = 2;
@@ -8651,49 +8659,42 @@ my %nikonFocalConversions = (
8651
8659
  my $DynamicM = 1;
8652
8660
  my $DynamicL = 2;
8653
8661
 
8654
- my $start = 424; #FX - all flavors
8655
- $start = 572 if $areaMode == $DX and ($afAreaMode == $Dynamic or $afAreaMode == $WideL or $afAreaMode == $ThreeD or $afAreaMode == $Auto or $afAreaMode >= $WideC1); #DX Wide(L/C1/C2) + Dynamic(L/M/S) + 3D + Auto
8656
- $start = 542 if $areaMode == $DX and $afAreaMode == 3 ; #DX Wide(S)
8657
-
8658
- my $increment = 291; #FX - all flavors
8659
- $increment = 436 if $areaMode == $DX and ($afAreaMode == $Dynamic or $afAreaMode == $WideL or $afAreaMode == $ThreeD or $afAreaMode == $Auto or $afAreaMode >= $WideC1); #DX Wide(L/C1/C2) + Dynamic (L/M/S) +3D + Auto
8660
- $increment = 442 if $areaMode == $DX and $afAreaMode == 3 ; #DX Wide(S)
8662
+ my $start = 424; #FX, 16:9 & 1:1 formats
8663
+ my $increment = 291; #FX, & 16:9 formats
8664
+ $start = $start + $increment if $imageArea == $WideScreen and $val > 0;
8661
8665
 
8662
- my $divisor = 7;
8663
- $divisor = 10 if $areaMode == $DX ; #DX
8666
+ if ($imageArea == $DX) { # DX results are in FX coordinate system to match reporting of ($AFAreaXPosition , $AFAreaYPosition)
8667
+ $start = 572;
8668
+ $increment = 436;
8669
+ if ( $afAreaMode == $WideS ) { #Wide S focus box is a strange size
8670
+ $start = 542;
8671
+ $increment = 442;
8672
+ }
8673
+ }
8664
8674
 
8665
- my $offsetVal = -1;
8666
- $offsetVal = 39 if $afAreaMode == $Dynamic and ( $dynamicAFAreaSize == $DynamicL ) ; #Dynamic (L) - force positive values so perl rounding toward zero isn't an issue
8667
- $offsetVal = 40 if $afAreaMode == $Dynamic and $dynamicAFAreaSize == $DynamicM ; #Dynamic (M)
8668
- $offsetVal = 40 if $areaMode == $FX and (($afAreaMode == $Dynamic and $dynamicAFAreaSize == $DynamicS) or $afAreaMode == $ThreeD) ; #FX Dynamic (S) or 3D
8669
- $offsetVal = 38 if $areaMode == $DX and ($afAreaMode == $Dynamic and $dynamicAFAreaSize == $DynamicS ) ; #DX Dynamic (S)or 3D
8675
+ my $divisor = 6.67;
8676
+ $divisor = 10.01 if $imageArea == $DX ; #extra .01 to ensure $val of 10*n+5 rounds down
8677
+ $divisor = 8.01 if $imageArea == $WideScreen ;
8670
8678
 
8671
- my $offsetSum = 0;
8672
- $offsetSum = -6 if $areaMode == $FX and ($afAreaMode == $Dynamic or $afAreaMode == $ThreeD); #FX Dynamic (L/M/S) or 3D
8673
- $offsetSum = -4 if $areaMode == $DX and ($afAreaMode == $Dynamic or $afAreaMode == $ThreeD ); #DX Dynamic (L/M/S) or 3D
8679
+ my $roundedValOverDivisor = sprintf("%.0f", $val / $divisor); #round to nearest int
8674
8680
 
8675
- my $nrow = $$self{AFAreaInitialHeight};
8676
- $nrow = int($nrow * 2 / 3) if $areaMode == $DX; #DX
8681
+ my $focusBoxHeight = $$self{AFAreaInitialHeight} ; #wider focus boxes (e.g., DynM, DynL and some Wide C1/C2) will start and end closer to the center of the frame
8682
+ $focusBoxHeight = int($focusBoxHeight * 2 / 3) if $imageArea == $DX ;
8677
8683
 
8678
- #some sample mappings:
8679
- #FX Wide(S/L/C1/C2) map [7, 13, 20, 27, 33, 40, 47, 53, 60, 67, 74, 80, 87, 94, 100, 107, 114] to [424, 715, 1006, 1297, 1588, 1879, 2170, 2461, 2752, 3043, 3334, 3625, 3916, 4207, 4498, 4789, 5080]
8680
- #DX Wide(L/C1/C2) map [7, 17, 28, 38, 48, 58, 69, 79, 89, 100, 110] to [572, 1008, 1444, 1880, 2316, 2752, 3188, 3624, 4060, 4496, 4932]
8681
- #DX Wide(S) map for Wide(S) [7, 17, 28, 38, 48, 58, 69, 79, 89] to [984, 1426, 1868, 2310, 2752, 3194, 3636, 4078, 4520]
8682
- #FX Dynamic (L) map [-19, -13, -6, 0, 7, 13, 20, 27, 33, 40, 47, 53, 60, 67, 74] to [715, 1006, 1297, 1588, 1879, 2170, 2461, 2752, 3043, 3334, 3625, 3916, 4207, 4498, 4789]
8684
+ my $skipPositions = int($focusBoxHeight / 2); #jump over half the height of the focus box
8683
8685
 
8684
- return $start + $increment * (int(($val + $offsetVal) / $divisor) + int($nrow / 2) + $offsetSum) ;;
8686
+ my $result = $start + $increment * ($roundedValOverDivisor + $skipPositions - 1 ) ;
8687
+ return $result;
8685
8688
  },
8686
8689
  },
8687
8690
  0x0bea => {
8688
8691
  Name => 'AFAreaInitialWidth',
8689
8692
  Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96', #not valid for C30/C60/C120
8690
- ValueConv => '$$self{VALUE}{PhotoShootingMenuBankImageArea} eq 0 ? $val : int($val * 2 / 3)', #DX mode requires scaling down TODO: add support ImageAreas 1:1 and 16:9
8691
8693
  RawConv => '$$self{AFAreaInitialWidth} = 1 + int ($val / 4)', #convert from [3, 11, 19, 35, 51, 75] to [1, 3, 5, 9 13, 19] to match camera options for C1/C2 focus modes .. input/output of 11/3 is for Wide(S)
8692
8694
  },
8693
8695
  0x0beb => {
8694
8696
  Name => 'AFAreaInitialHeight',
8695
8697
  Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96', #not valid for C30/C60/C120
8696
- ValueConv => '$$self{VALUE}{PhotoShootingMenuBankImageArea} eq 0 ? $val : int($val * 2 / 3)', #DX mode requires scaling down TODO: add support ImageAreas 1:1 and 16:9
8697
8698
  RawConv => '$$self{AFAreaInitialHeight} = 1 + int ($val / 7) ', #convert from [6, 20, 33, 46, 73] to [1, 3, 5, 7, 11] to match camera options for C1/C2 focus modes .. input/output of 33/5 is for Wide(L)
8698
8699
  },
8699
8700
  );
@@ -9384,7 +9385,7 @@ my %nikonFocalConversions = (
9384
9385
  %Image::ExifTool::Nikon::MenuSettingsZ9 = (
9385
9386
  %binaryDataAttrs,
9386
9387
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9387
- DATAMEMBER => [ 140, 188, 192, 232, 424, 528, 534, 576 ],
9388
+ DATAMEMBER => [ 140, 188, 192, 232, 308, 424, 528, 534, 576 ],
9388
9389
  IS_SUBDIR => [ 799 ],
9389
9390
  NOTES => 'These tags are used by the Z9.',
9390
9391
  #90 ISO
@@ -9429,7 +9430,7 @@ my %nikonFocalConversions = (
9429
9430
  },
9430
9431
  274 => { Name => 'PhotoShootingMenuBank', PrintConv => \%banksZ9 },
9431
9432
  276 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, #single tag from both Photo & Video menus
9432
- 308 => { Name => 'PhotoShootingMenuBankImageArea', PrintConv => \%imageAreaZ9 },
9433
+ 308 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
9433
9434
  #310 ImageQuality
9434
9435
  322 => { Name => 'AutoISO', PrintConv => \%offOn },
9435
9436
  324 => {
@@ -9595,7 +9596,7 @@ my %nikonFocalConversions = (
9595
9596
  %Image::ExifTool::Nikon::MenuSettingsZ9v3 = (
9596
9597
  %binaryDataAttrs,
9597
9598
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9598
- DATAMEMBER => [ 154, 204, 208, 248, 444, 548, 554, 596 ],
9599
+ DATAMEMBER => [ 154, 204, 208, 248, 328, 444, 548, 554, 596 ],
9599
9600
  IS_SUBDIR => [ 847 ],
9600
9601
  NOTES => 'These tags are used by the Z9 firmware 3.00.',
9601
9602
  72 => {
@@ -9642,7 +9643,7 @@ my %nikonFocalConversions = (
9642
9643
  },
9643
9644
  290 => { Name => 'PhotoShootingMenuBank', PrintConv => \%banksZ9 },
9644
9645
  292 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
9645
- 328 => { Name => 'PhotoShootingMenuBankImageArea', PrintConv => \%imageAreaZ9 },
9646
+ 328 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
9646
9647
  342 => { Name => 'AutoISO', PrintConv => \%offOn },
9647
9648
  344 => {
9648
9649
  Name => 'ISOAutoHiLimit',
@@ -9828,7 +9829,7 @@ my %nikonFocalConversions = (
9828
9829
  %Image::ExifTool::Nikon::MenuSettingsZ9v4 = (
9829
9830
  %binaryDataAttrs,
9830
9831
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9831
- DATAMEMBER => [ 154, 204, 208, 248, 444, 548, 554, 570, 596 ],
9832
+ DATAMEMBER => [ 154, 204, 208, 248, 328, 444, 548, 554, 570, 596 ],
9832
9833
  IS_SUBDIR => [ 847 ],
9833
9834
  NOTES => 'These tags are used by the Z9 firmware 3.00.',
9834
9835
  72 => {
@@ -9875,7 +9876,7 @@ my %nikonFocalConversions = (
9875
9876
  },
9876
9877
  290 => { Name => 'PhotoShootingMenuBank', PrintConv => \%banksZ9 },
9877
9878
  292 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
9878
- 328 => { Name => 'PhotoShootingMenuBankImageArea', PrintConv => \%imageAreaZ9 },
9879
+ 328 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
9879
9880
  #334 JPGCompression 0 => 'Size Priority', 1 => 'Optimal Quality',
9880
9881
  342 => { Name => 'AutoISO', PrintConv => \%offOn },
9881
9882
  344 => {
@@ -11429,13 +11430,80 @@ my %nikonFocalConversions = (
11429
11430
  # 0x02 - undef[148]
11430
11431
  # 0x03 - undef[284]
11431
11432
  # 0x04 - undef[148,212]
11432
- # 0x05 - undef[84] (barrel distortion params at offsets 0x14,0x1c,0x24, ref 28)
11433
- # 0x06 - undef[116] (vignette correction params at offsets 0x24,0x34,0x44, ref 28)
11433
+ 0x05 => { #28
11434
+ Name => 'DistortionInfo', # Z-series distortion correction information
11435
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::DistortionInfo' },
11436
+ },
11437
+ 0x06 => { #28
11438
+ Name => 'VignetteInfo', # Z-series vignette correction information
11439
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::VignetteInfo' },
11440
+ },
11434
11441
  # 0x07 - undef[104]
11435
11442
  # 0x08 - undef[24]
11436
11443
  # 0x09 - undef[36]
11437
11444
  );
11438
11445
 
11446
+ # Z-series distortion correction information (correction model is appears to be a cubic polynomial) (ref 28)
11447
+ %Image::ExifTool::Nikon::DistortionInfo = (
11448
+ %binaryDataAttrs,
11449
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
11450
+ 0 => {
11451
+ Name => 'DistortionCorrectionVersion',
11452
+ Format => 'string[4]',
11453
+ },
11454
+ 4 => {
11455
+ Name => 'DistortionCorrection', #used by ACR to determine whether the built-in lens profile is applied
11456
+ Format => 'int8u',
11457
+ PrintConv => {
11458
+ 1 => 'On (Optional)',
11459
+ 2 => 'Off',
11460
+ 3 => 'On (Required)',
11461
+ },
11462
+ },
11463
+ #0x10 Degree of radial distortion correction polynomial? (always 4? - decodes for the first 3 coefficients follow, the 4th at 0x2c/0x30 seems to always be 0)
11464
+ 0x14 => {
11465
+ Name => 'RadialDistortionCoefficient1',
11466
+ Format => 'rational64s',
11467
+ PrintConv => 'sprintf("%.5f",$val)',
11468
+ },
11469
+ 0x1c => {
11470
+ Name => 'RadialDistortionCoefficient2',
11471
+ Format => 'rational64s',
11472
+ PrintConv => 'sprintf("%.5f",$val)',
11473
+ },
11474
+ 0x24 => {
11475
+ Name => 'RadialDistortionCoefficient3',
11476
+ Format => 'rational64s',
11477
+ PrintConv => 'sprintf("%.5f",$val)',
11478
+ },
11479
+ );
11480
+
11481
+ # Z-series vignette correction information (correction model seems to be using a 6th order even polynomial) (ref 28)
11482
+ %Image::ExifTool::Nikon::VignetteInfo = (
11483
+ %binaryDataAttrs,
11484
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
11485
+ 0 => {
11486
+ Name => 'VignetteCorrectionVersion',
11487
+ Format => 'string[4]',
11488
+ },
11489
+ #0x10 Degree of vignette correction polynomial? (always 8? - decodes for the first 3 coefficents follow, the 4th at 0x4c/0x50 seems to always be 0)
11490
+ 0x24 => {
11491
+ Name => 'VignetteCoefficient1',
11492
+ Format => 'rational64s',
11493
+ PrintConv => 'sprintf("%.5f",$val)',
11494
+ },
11495
+ 0x34 => {
11496
+ Name => 'VignetteCoefficient2',
11497
+ Format => 'rational64s',
11498
+ PrintConv => 'sprintf("%.5f",$val)',
11499
+ },
11500
+ 0x44 => {
11501
+ Name => 'VignetteCoefficient3',
11502
+ Format => 'rational64s',
11503
+ PrintConv => 'sprintf("%.5f",$val)',
11504
+ },
11505
+ );
11506
+
11439
11507
  # tags in Nikon QuickTime videos (PH - observations with Coolpix S3)
11440
11508
  # (similar information in Kodak,Minolta,Nikon,Olympus,Pentax and Sanyo videos)
11441
11509
  %Image::ExifTool::Nikon::MOV = (
@@ -58,7 +58,7 @@ use Image::ExifTool::Exif;
58
58
  use Image::ExifTool::GPS;
59
59
  use Image::ExifTool::HP;
60
60
 
61
- $VERSION = '3.44';
61
+ $VERSION = '3.45';
62
62
 
63
63
  sub CryptShutterCount($$);
64
64
  sub PrintFilter($$$);
@@ -410,7 +410,8 @@ sub DecodeAFPoints($$$$;$);
410
410
  #
411
411
  # Ricoh lenses
412
412
  #
413
- '31 1' => 'GR Lens', #PH (GR III 28mm F2.8)
413
+ '31 1' => '18.3mm F2.8', #PH (GR III built-in)
414
+ '31 4' => '26.1mm F2.8', #PH (GR IIIx built-in)
414
415
  );
415
416
 
416
417
  # Pentax model ID codes - PH
@@ -1141,8 +1142,12 @@ my %binaryDataAttrs = (
1141
1142
  3 => 'Manual',
1142
1143
  4 => 'Super Macro', #JD
1143
1144
  5 => 'Pan Focus',
1144
- # 8 - seen for Ricoh GR III
1145
- # 9 - seen for Ricoh GR III
1145
+ 6 => 'Auto-area', # (GR III)
1146
+ 8 => 'Select', # (GR III)
1147
+ 9 => 'Pinpoint', # (GR III)
1148
+ 10 => 'Tracking', # (GR III)
1149
+ 11 => 'Continuous', # (GR III)
1150
+ 12 => 'Snap', # (GR III)
1146
1151
  16 => 'AF-S (Focus-priority)', #17
1147
1152
  17 => 'AF-C (Focus-priority)', #17
1148
1153
  18 => 'AF-A (Focus-priority)', #PH (educated guess)
@@ -1903,6 +1908,7 @@ my %binaryDataAttrs = (
1903
1908
  '0 28' => 'Quick Macro', # (Q)
1904
1909
  '0 29' => 'Forest', # (Q)
1905
1910
  '0 30' => 'Backlight Silhouette', # (Q)
1911
+ '0 32' => 'DOF', #PH (GR III)
1906
1912
  # AUTO PICT modes (auto-selected)
1907
1913
  '1 4' => 'Auto PICT (Standard)', #13
1908
1914
  '1 5' => 'Auto PICT (Portrait)', #7 (K100D)
@@ -2146,6 +2152,7 @@ my %binaryDataAttrs = (
2146
2152
  10 => 'Cross Processing', #31 (K-70)
2147
2153
  11 => 'Flat', #31 (K-70)
2148
2154
  # 256 - seen for GR III
2155
+ # 257 - seen for GR III
2149
2156
  # 262 - seen for GR III
2150
2157
  32768 => 'n/a',
2151
2158
  },
@@ -2584,8 +2591,10 @@ my %binaryDataAttrs = (
2584
2591
  PrintConv => {
2585
2592
  0 => 'Off',
2586
2593
  1 => 'On',
2587
- '0 2' => 'Off (0 2)', #PH (NC, GR III)
2588
- '1 2' => 'On (1 2)', #PH (NC, GR III)
2594
+ '0 0' => 'Off (Off)', #PH (GR III)
2595
+ '1 1' => 'On (On)', #PH (GR III)
2596
+ '0 2' => 'Off (Auto)', #PH (GR III)
2597
+ '1 2' => 'On (Auto)', #PH (GR III)
2589
2598
  },
2590
2599
  },
2591
2600
  0x008b => { #PH (LS465)
@@ -48,7 +48,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
48
48
  use Image::ExifTool::Exif;
49
49
  use Image::ExifTool::GPS;
50
50
 
51
- $VERSION = '2.89';
51
+ $VERSION = '2.91';
52
52
 
53
53
  sub ProcessMOV($$;$);
54
54
  sub ProcessKeys($$$);
@@ -2338,16 +2338,33 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
2338
2338
  # RDT9 - only 16-byte header?
2339
2339
  # the boxes below all have a similar header (little-endian):
2340
2340
  # 0 int32u - number of records
2341
- # 4 ? - "1e 00"
2341
+ # 4 int32u - sample rate (Hz)
2342
2342
  # 6 int16u - record length in bytes
2343
- # 8 ? - "23 01 00 00 00 00 00 00"
2344
- # 16 - start of records (each record ends in an int64u timestamp "ts" in ns)
2345
- # RDTA - float[4],ts: "-0.31289672 -0.2245330 11.303817 0 775.780"
2346
- # RDTB - float[4],ts: "-0.04841613 -0.2166595 0.0724792 0 775.780"
2347
- # RDTC - float[4],ts: "27.60925 -27.10037 -13.27285 0 775.829"
2343
+ # 8 int16u - 0x0123 = little-endian, 0x3210 = big endian
2344
+ # 10 int16u[3] - all zeros
2345
+ # 16 - start of records (each record ends in an int64u timestamp "ts" in ns)
2346
+ RDTA => {
2347
+ Name => 'RicohRDTA',
2348
+ SubDirectory => { TagTable => 'Image::ExifTool::Ricoh::RDTA' },
2349
+ },
2350
+ RDTB => {
2351
+ Name => 'RicohRDTB',
2352
+ SubDirectory => { TagTable => 'Image::ExifTool::Ricoh::RDTB' },
2353
+ },
2354
+ RDTC => {
2355
+ Name => 'RicohRDTC',
2356
+ SubDirectory => { TagTable => 'Image::ExifTool::Ricoh::RDTC' },
2357
+ },
2348
2358
  # RDTD - int16s[3],ts: "353 -914 16354 0 775.829"
2349
- # RDTG - ts: "775.825"
2359
+ RDTG => {
2360
+ Name => 'RicohRDTG',
2361
+ SubDirectory => { TagTable => 'Image::ExifTool::Ricoh::RDTG' },
2362
+ },
2350
2363
  # RDTI - float[4],ts: "0.00165951 0.005770059 0.06838259 0.1744695 775.862"
2364
+ RDTL => {
2365
+ Name => 'RicohRDTL',
2366
+ SubDirectory => { TagTable => 'Image::ExifTool::Ricoh::RDTL' },
2367
+ },
2351
2368
  # ---- Samsung ----
2352
2369
  vndr => 'Vendor', #PH (Samsung PL70)
2353
2370
  SDLN => 'PlayMode', #PH (NC, Samsung ST80 "SEQ_PLAY")
@@ -2371,7 +2388,7 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
2371
2388
  # edli - 52 bytes all zero (Samsung WB30F)
2372
2389
  # @etc - 4 bytes all zero (Samsung WB30F)
2373
2390
  # saut - 4 bytes all zero (Samsung SM-N900T)
2374
- # smrd - string "TRUEBLUE" (Samsung SM-C101)
2391
+ # smrd - string "TRUEBLUE" (Samsung SM-C101, etc)
2375
2392
  # ---- TomTom Bandit Action Cam ----
2376
2393
  TTMD => {
2377
2394
  Name => 'TomTomMetaData',
@@ -2391,7 +2408,7 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
2391
2408
  # opax - 164 bytes unknown (center and affine arrays? ref 26)
2392
2409
  # opai - 32 bytes (maybe contains a serial number starting at byte 16? - PH) (rgb gains, degamma, gamma? ref 26)
2393
2410
  # intv - 16 bytes all zero
2394
- # ---- Xaiomi ----
2411
+ # ---- Xiaomi ----
2395
2412
  mcvr => {
2396
2413
  Name => 'PreviewImage',
2397
2414
  Groups => { 2 => 'Preview' },
@@ -6603,11 +6620,13 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
6603
6620
  'collection.user' => 'UserCollection', #22
6604
6621
  'Encoded_With' => 'EncodedWith',
6605
6622
  'content.identifier' => 'ContentIdentifier', #forum14874
6623
+ 'encoder' => { }, # forum15418 (written by ffmpeg)
6606
6624
  #
6607
6625
  # the following tags aren't in the com.apple.quicktime namespace:
6608
6626
  #
6609
6627
  'com.apple.photos.captureMode' => 'CaptureMode',
6610
6628
  'com.android.version' => 'AndroidVersion',
6629
+ 'com.android.capture.fps' => 'AndroidCaptureFPS',
6611
6630
  #
6612
6631
  # also seen
6613
6632
  #