exiftool-vendored.pl 12.45.0 → 12.50.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 (57) hide show
  1. package/bin/Changes +122 -6
  2. package/bin/MANIFEST +12 -0
  3. package/bin/META.json +1 -1
  4. package/bin/META.yml +1 -1
  5. package/bin/README +45 -44
  6. package/bin/config_files/acdsee.config +2 -1
  7. package/bin/config_files/frameCount.config +56 -0
  8. package/bin/config_files/tiff_version.config +1 -1
  9. package/bin/exiftool +89 -75
  10. package/bin/lib/Image/ExifTool/Apple.pm +6 -2
  11. package/bin/lib/Image/ExifTool/BuildTagLookup.pm +17 -9
  12. package/bin/lib/Image/ExifTool/Canon.pm +31 -14
  13. package/bin/lib/Image/ExifTool/CanonRaw.pm +8 -1
  14. package/bin/lib/Image/ExifTool/Exif.pm +13 -8
  15. package/bin/lib/Image/ExifTool/FLAC.pm +17 -3
  16. package/bin/lib/Image/ExifTool/FlashPix.pm +4 -2
  17. package/bin/lib/Image/ExifTool/FujiFilm.pm +31 -5
  18. package/bin/lib/Image/ExifTool/Geotag.pm +1 -1
  19. package/bin/lib/Image/ExifTool/ICC_Profile.pm +1 -1
  20. package/bin/lib/Image/ExifTool/ICO.pm +143 -0
  21. package/bin/lib/Image/ExifTool/ID3.pm +5 -5
  22. package/bin/lib/Image/ExifTool/IPTC.pm +5 -1
  23. package/bin/lib/Image/ExifTool/M2TS.pm +98 -8
  24. package/bin/lib/Image/ExifTool/MIE.pm +9 -3
  25. package/bin/lib/Image/ExifTool/MISB.pm +494 -0
  26. package/bin/lib/Image/ExifTool/MakerNotes.pm +3 -1
  27. package/bin/lib/Image/ExifTool/Nikon.pm +220 -109
  28. package/bin/lib/Image/ExifTool/NikonSettings.pm +5 -3
  29. package/bin/lib/Image/ExifTool/Olympus.pm +2 -1
  30. package/bin/lib/Image/ExifTool/Panasonic.pm +21 -4
  31. package/bin/lib/Image/ExifTool/PanasonicRaw.pm +12 -5
  32. package/bin/lib/Image/ExifTool/Pentax.pm +7 -2
  33. package/bin/lib/Image/ExifTool/Photoshop.pm +29 -3
  34. package/bin/lib/Image/ExifTool/QuickTime.pm +78 -10
  35. package/bin/lib/Image/ExifTool/QuickTimeStream.pl +76 -5
  36. package/bin/lib/Image/ExifTool/README +5 -1
  37. package/bin/lib/Image/ExifTool/RIFF.pm +106 -9
  38. package/bin/lib/Image/ExifTool/Samsung.pm +2 -2
  39. package/bin/lib/Image/ExifTool/Sigma.pm +27 -1
  40. package/bin/lib/Image/ExifTool/SigmaRaw.pm +37 -13
  41. package/bin/lib/Image/ExifTool/Sony.pm +35 -16
  42. package/bin/lib/Image/ExifTool/TagInfoXML.pm +3 -1
  43. package/bin/lib/Image/ExifTool/TagLookup.pm +4700 -4520
  44. package/bin/lib/Image/ExifTool/TagNames.pod +4796 -4463
  45. package/bin/lib/Image/ExifTool/Text.pm +3 -4
  46. package/bin/lib/Image/ExifTool/Torrent.pm +2 -3
  47. package/bin/lib/Image/ExifTool/WriteCanonRaw.pl +7 -0
  48. package/bin/lib/Image/ExifTool/WriteExif.pl +19 -1
  49. package/bin/lib/Image/ExifTool/WriteRIFF.pl +359 -0
  50. package/bin/lib/Image/ExifTool/Writer.pl +6 -2
  51. package/bin/lib/Image/ExifTool/XMP.pm +72 -57
  52. package/bin/lib/Image/ExifTool/XMP2.pl +9 -1
  53. package/bin/lib/Image/ExifTool.pm +81 -18
  54. package/bin/lib/Image/ExifTool.pod +64 -60
  55. package/bin/perl-Image-ExifTool.spec +43 -43
  56. package/bin/pp_build_exe.args +7 -4
  57. package/package.json +2 -2
@@ -49,6 +49,7 @@
49
49
  # 36) Hayo Baann (forum10207)
50
50
  # 37) Tom Lachecki, private communication
51
51
  # 38) https://github.com/exiftool/exiftool/pull/40 (and forum10893)
52
+ # 39) Stefan Grube private communication (Z9)
52
53
  # IB) Iliah Borg private communication (LibRaw)
53
54
  # JD) Jens Duttke private communication
54
55
  # NJ) Niels Kristian Bech Jensen private communication
@@ -63,7 +64,7 @@ use Image::ExifTool::Exif;
63
64
  use Image::ExifTool::GPS;
64
65
  use Image::ExifTool::XMP;
65
66
 
66
- $VERSION = '4.09';
67
+ $VERSION = '4.13';
67
68
 
68
69
  sub LensIDConv($$$);
69
70
  sub ProcessNikonAVI($$$);
@@ -363,6 +364,7 @@ sub GetAFPointGrid($$;$);
363
364
  '26 58 37 37 14 14 1C 02' => 'Sigma 24mm F1.8 EX DG Aspherical Macro',
364
365
  'E1 58 37 37 14 14 1C 02' => 'Sigma 24mm F1.8 EX DG Aspherical Macro',
365
366
  '02 46 37 37 25 25 02 00' => 'Sigma 24mm F2.8 Super Wide II Macro',
367
+ '7E 54 37 37 0C 0C 4B 06' => 'Sigma 24mm F1.4 DG HSM | A', #30
366
368
  '26 58 3C 3C 14 14 1C 02' => 'Sigma 28mm F1.8 EX DG Aspherical Macro',
367
369
  '48 54 3E 3E 0C 0C 4B 06' => 'Sigma 30mm F1.4 EX DC HSM',
368
370
  'F8 54 3E 3E 0C 0C 4B 06' => 'Sigma 30mm F1.4 EX DC HSM', #JD
@@ -669,6 +671,7 @@ sub GetAFPointGrid($$;$);
669
671
  '00 40 64 64 2C 2C 00 00' => 'Voigtlander APO-Lanthar 90mm F3.5 SLII Close Focus',
670
672
  '07 40 30 45 2D 35 03 02.2' => 'Voigtlander Ultragon 19-35mm F3.5-4.5 VMV', #NJ
671
673
  '71 48 64 64 24 24 00 00' => 'Voigtlander APO-Skopar 90mm F2.8 SL IIs', #30
674
+ 'FD 00 50 50 18 18 DF 00' => 'Voigtlander APO-Lanthar 50mm F2 Aspherical', #35
672
675
  #
673
676
  '00 40 2D 2D 2C 2C 00 00' => 'Carl Zeiss Distagon T* 3.5/18 ZF.2',
674
677
  '00 48 27 27 24 24 00 00' => 'Carl Zeiss Distagon T* 2.8/15 ZF.2', #MykytaKozlov
@@ -856,7 +859,7 @@ my %focusModeZ7 = (
856
859
 
857
860
  my %infoZSeries = (
858
861
  Condition => '$$self{Model} =~ /^NIKON Z (5|50|6|6_2|7|7_2|fc|9)\b/i',
859
- Notes => 'Z Series cameras thru Decemeber 2021',
862
+ Notes => 'Z Series cameras thru December 2021',
860
863
  );
861
864
  my %iSOAutoHiLimitZ7 = (
862
865
  0 => 'ISO 64',
@@ -1125,8 +1128,6 @@ my %afPoints153 = (
1125
1128
 
1126
1129
  # AF point indices for models with 81 focus points, eg. Z6/Z7/Z50 (ref 38)
1127
1130
  # - 9 rows (A-I) with 9 columns (1-9), center is E5
1128
- # NOTE: the AF points start 2 bytes into the data, so the map starts
1129
- # at 17 instead of 1
1130
1131
  #
1131
1132
  # 7 6 5 4 3 2 1 0
1132
1133
  # 00 : [H5][G5][F5][A5][B5][C5][D5][E5]
@@ -1141,23 +1142,23 @@ my %afPoints153 = (
1141
1142
  # 09 : [H1][G1][F1][A1][B1][C1][D1][E1]
1142
1143
  # 0a : [ ][ ][ ][ ][ ][ ][ ][I1]
1143
1144
  my %afPoints81 = (
1144
- 17 => 'E5', 34 => 'I6', 51 => 'H7', 68 => 'G8', 85 => 'F9',
1145
- 18 => 'D5', 35 => 'E4', 52 => 'I7', 69 => 'H8', 86 => 'G9',
1146
- 19 => 'C5', 36 => 'D4', 53 => 'E3', 70 => 'I8', 87 => 'H9',
1147
- 20 => 'B5', 37 => 'C4', 54 => 'D3', 71 => 'E2', 88 => 'I9',
1148
- 21 => 'A5', 38 => 'B4', 55 => 'C3', 72 => 'D2', 89 => 'E1',
1149
- 22 => 'F5', 39 => 'A4', 56 => 'B3', 73 => 'C2', 90 => 'D1',
1150
- 23 => 'G5', 40 => 'F4', 57 => 'A3', 74 => 'B2', 91 => 'C1',
1151
- 24 => 'H5', 41 => 'G4', 58 => 'F3', 75 => 'A2', 92 => 'B1',
1152
- 25 => 'I5', 42 => 'H4', 59 => 'G3', 76 => 'F2', 93 => 'A1',
1153
- 26 => 'E6', 43 => 'I4', 60 => 'H3', 77 => 'G2', 94 => 'F1',
1154
- 27 => 'D6', 44 => 'E7', 61 => 'I3', 78 => 'H2', 95 => 'G1',
1155
- 28 => 'C6', 45 => 'D7', 62 => 'E8', 79 => 'I2', 96 => 'H1',
1156
- 29 => 'B6', 46 => 'C7', 63 => 'D8', 80 => 'E9', 97 => 'I1',
1157
- 30 => 'A6', 47 => 'B7', 64 => 'C8', 81 => 'D9',
1158
- 31 => 'F6', 48 => 'A7', 65 => 'B8', 82 => 'C9',
1159
- 32 => 'G6', 49 => 'F7', 66 => 'A8', 83 => 'B9',
1160
- 33 => 'H6', 50 => 'G7', 67 => 'F8', 84 => 'A9',
1145
+ 1 => 'E5', 18 => 'I6', 35 => 'H7', 52 => 'G8', 69 => 'F9',
1146
+ 2 => 'D5', 19 => 'E4', 36 => 'I7', 53 => 'H8', 70 => 'G9',
1147
+ 3 => 'C5', 20 => 'D4', 37 => 'E3', 54 => 'I8', 71 => 'H9',
1148
+ 4 => 'B5', 21 => 'C4', 38 => 'D3', 55 => 'E2', 72 => 'I9',
1149
+ 5 => 'A5', 22 => 'B4', 39 => 'C3', 56 => 'D2', 73 => 'E1',
1150
+ 6 => 'F5', 23 => 'A4', 40 => 'B3', 57 => 'C2', 74 => 'D1',
1151
+ 7 => 'G5', 24 => 'F4', 41 => 'A3', 58 => 'B2', 75 => 'C1',
1152
+ 8 => 'H5', 25 => 'G4', 42 => 'F3', 59 => 'A2', 76 => 'B1',
1153
+ 9 => 'I5', 26 => 'H4', 43 => 'G3', 60 => 'F2', 77 => 'A1',
1154
+ 10 => 'E6', 27 => 'I4', 44 => 'H3', 61 => 'G2', 78 => 'F1',
1155
+ 11 => 'D6', 28 => 'E7', 45 => 'I3', 62 => 'H2', 79 => 'G1',
1156
+ 12 => 'C6', 29 => 'D7', 46 => 'E8', 63 => 'I2', 80 => 'H1',
1157
+ 13 => 'B6', 30 => 'C7', 47 => 'D8', 64 => 'E9', 81 => 'I1',
1158
+ 14 => 'A6', 31 => 'B7', 48 => 'C8', 65 => 'D9',
1159
+ 15 => 'F6', 32 => 'A7', 49 => 'B8', 66 => 'C9',
1160
+ 16 => 'G6', 33 => 'F7', 50 => 'A8', 67 => 'B9',
1161
+ 17 => 'H6', 34 => 'G7', 51 => 'F8', 68 => 'A9',
1161
1162
  );
1162
1163
 
1163
1164
  my %cropHiSpeed = ( #IB
@@ -1598,10 +1599,14 @@ my %base64coord = (
1598
1599
  81 => 'Auto (Electronic Front Curtain)', #JanSkoda (Z6II)
1599
1600
  },
1600
1601
  },
1601
- 0x0035 => { #32
1602
+ 0x0035 => [{ #32
1602
1603
  Name => 'HDRInfo',
1604
+ Condition => '$count != 6',
1603
1605
  SubDirectory => { TagTable => 'Image::ExifTool::Nikon::HDRInfo' },
1604
- },
1606
+ },{
1607
+ Name => 'HDRInfo2',
1608
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::HDRInfo2' },
1609
+ }],
1605
1610
  0x0037 => { #XavierJubier
1606
1611
  Name => 'MechanicalShutterCount',
1607
1612
  Writable => 'int32u',
@@ -2086,7 +2091,7 @@ my %base64coord = (
2086
2091
  TagTable => 'Image::ExifTool::Nikon::ShotInfoZ9',
2087
2092
  DecryptStart => 4,
2088
2093
  # TODO: eventually set the length dynamically according to actual offsets!
2089
- DecryptLen => 0xec4b + 1907, # decoded thru end of Offset26
2094
+ DecryptLen => 0xec4b + 2105, # decoded thru end of Offset26
2090
2095
  ByteOrder => 'LittleEndian',
2091
2096
  },
2092
2097
  },
@@ -2487,6 +2492,12 @@ my %base64coord = (
2487
2492
  TagTable => 'Image::ExifTool::Nikon::MultiExposure',
2488
2493
  ByteOrder => 'LittleEndian',
2489
2494
  },
2495
+ },{
2496
+ Name => 'MultiExposure2',
2497
+ Condition => '$$valPt =~ /^010[23]/', # 0102 is NC (PH)
2498
+ SubDirectory => {
2499
+ TagTable => 'Image::ExifTool::Nikon::MultiExposure2',
2500
+ },
2490
2501
  }],
2491
2502
  0x00b1 => { #14/PH/JD (D80)
2492
2503
  Name => 'HighISONoiseReduction',
@@ -2803,10 +2814,10 @@ my %base64coord = (
2803
2814
  Name => 'VRMode',
2804
2815
  PrintConv => {
2805
2816
  0 => 'Off',
2806
- 1 => 'Sport',
2807
- 3 => 'Normal',
2817
+ 1 => 'Normal', #39 (was 'Sport')
2818
+ 3 => 'Sport', #39 (was 'Normal')
2808
2819
  },
2809
- %infoZSeries
2820
+ %infoZSeries,
2810
2821
  },{
2811
2822
  Name => 'VRMode',
2812
2823
  PrintConv => {
@@ -2817,6 +2828,13 @@ my %base64coord = (
2817
2828
  },
2818
2829
  }],
2819
2830
  # 7 - values: 0, 1
2831
+ 8 => { #39
2832
+ Name => 'VRType',
2833
+ PrintConv => {
2834
+ 2 => 'In-body', # (IBIS)
2835
+ 3 => 'In-body + Lens', # (IBIS + VR)
2836
+ },
2837
+ },
2820
2838
  );
2821
2839
 
2822
2840
  # Face detection information - PH (S8100)
@@ -3349,8 +3367,10 @@ my %base64coord = (
3349
3367
  sprintf("%s%.2d:%.2d", $sign, $h, abs($val)-60*$h);
3350
3368
  },
3351
3369
  PrintConvInv => q{
3352
- $val =~ /([-+]?)(\d+):(\d+)/ or return undef;
3353
- return $1 . ($2 * 60 + $3);
3370
+ $val =~ /Z$/ and return 0;
3371
+ $val =~ /([-+])(\d{1,2}):?(\d{2})$/ and return $1 . ($2 * 60 + $3);
3372
+ $val =~ /^(\d{2})(\d{2})$/ and return $1 * 60 + $2;
3373
+ return undef;
3354
3374
  },
3355
3375
  },
3356
3376
  2 => {
@@ -3567,7 +3587,6 @@ my %base64coord = (
3567
3587
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3568
3588
  DATAMEMBER => [ 0, 4, 6 ],
3569
3589
  NOTES => "These tags are written by Nikon DSLR's which have the live view feature.",
3570
- # NOTE: Must set ByteOrder in SubDirectory if any multi-byte integer tags added
3571
3590
  0 => {
3572
3591
  Name => 'AFInfo2Version',
3573
3592
  Format => 'undef[4]',
@@ -3678,7 +3697,7 @@ my %base64coord = (
3678
3697
  { #PH/JD
3679
3698
  Name => 'PrimaryAFPoint',
3680
3699
  # PrimaryAFPoint may only be valid for PhaseDetect - certainly true on the D6, possibly other bodies? (ref 28)
3681
- Condition => '$$self{PhaseDetectAF} < 2 and $$self{AFInfo2Version} ne "0301"',
3700
+ Condition => '$$self{PhaseDetectAF} < 2 and $$self{AFInfo2Version} !~ /^03/',
3682
3701
  Notes => q{
3683
3702
  models with 51-point AF -- 5 rows (A-E) and 11 columns (1-11): D3, D3S, D3X,
3684
3703
  D4, D4S, D300, D300S, D700, D800, D800e and D810
@@ -3784,22 +3803,6 @@ my %base64coord = (
3784
3803
  1 => 'E9 (Center)',
3785
3804
  },
3786
3805
  },
3787
- { #PH (Z7) (NC)
3788
- Name => 'PrimaryAFPoint',
3789
- Condition => '$$self{PhaseDetectAF} == 8 and $$self{AFInfo2Version} =~ /^03/',
3790
- Notes => q{
3791
- Nikon models with 493-point AF -- 17 rows (A-Q) and 29 columns (1-29), I15
3792
- at the center
3793
- },
3794
- PrintConv => {
3795
- 0 => '(none)',
3796
- 246 => 'I15 (Center)',
3797
- OTHER => sub {
3798
- my ($val, $inv) = @_;
3799
- return GetAFPointGrid($val, 29, $inv);
3800
- },
3801
- },
3802
- },
3803
3806
  {
3804
3807
  Name => 'PrimaryAFPoint',
3805
3808
  Condition => '$$self{AFInfo2Version} eq "0100"',
@@ -3813,7 +3816,7 @@ my %base64coord = (
3813
3816
  8 => [
3814
3817
  { #JD/PH
3815
3818
  Name => 'AFPointsUsed',
3816
- Condition => '$$self{PhaseDetectAF} < 2 and $$self{AFInfo2Version} ne "0301"',
3819
+ Condition => '$$self{PhaseDetectAF} < 2 and $$self{AFInfo2Version} !~ /^03/',
3817
3820
  Notes => q{
3818
3821
  models with 51-point AF -- 5 rows: A1-9, B1-11, C1-11, D1-11, E1-9. Center
3819
3822
  point is C6
@@ -3917,33 +3920,78 @@ my %base64coord = (
3917
3920
  PrintConv => sub { PrintAFPoints(shift, \%afPoints153); },
3918
3921
  PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153); },
3919
3922
  },
3920
- { #38 (Z6/Z7/Z50)
3921
- Name => 'AFPointsUsed',
3922
- Condition => '$$self{PhaseDetectAF} == 8 and $$self{Model} =~ /^NIKON Z/',
3923
- Notes => q{
3924
- models with 81-selectable point AF -- 9 rows (A-I) and 9 columns (1-9) for
3925
- phase detect AF points. Center point is E5
3926
- },
3927
- Format => 'undef[13]',
3928
- ValueConv => 'join(" ", unpack("H2"x13, $val))',
3929
- ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
3930
- PrintConv => sub { PrintAFPoints(shift, \%afPoints81); },
3931
- PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints81); },
3932
- },
3933
3923
  { #PH
3934
3924
  Name => 'AFPointsUsed',
3935
3925
  # version 301 uses a separate field at offset 0x0a for this tag (ref 28)
3936
- Condition => '$$self{AFInfo2Version} ne "0301"',
3926
+ Condition => '$$self{AFInfo2Version} !~ /^03/',
3937
3927
  Format => 'undef[7]',
3938
3928
  ValueConv => 'join(" ", unpack("H2"x7, $val))',
3939
3929
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
3940
3930
  PrintConv => '"Unknown ($val)"',
3941
3931
  PrintConvInv => '$val=~s/Unknown \\((.*)\\)/$1/; $val',
3942
3932
  },
3933
+ { #PH
3934
+ Name => 'PrimaryAFPoint',
3935
+ Condition => '$$self{PhaseDetectAF} == 1 and $$self{AFInfo2Version} =~ /^03/',
3936
+ Notes => 'newer models with 51-point AF',
3937
+ PrintConvColumns => 5,
3938
+ PrintConv => {
3939
+ 0 => '(none)',
3940
+ %afPoints51,
3941
+ 1 => 'C6 (Center)', # (add " (Center)" to central point)
3942
+ },
3943
+ },
3944
+ { #PH (Z7)
3945
+ Name => 'PrimaryAFPoint',
3946
+ Condition => '$$self{PhaseDetectAF} == 8 and $$self{AFInfo2Version} =~ /^03/',
3947
+ PrintConv => {
3948
+ 0 => '(none)',
3949
+ %afPoints81,
3950
+ 1 => 'E5 (Center)', # (add " (Center)" to central point)
3951
+ },
3952
+ },
3953
+ # this was wrong, but keep the code as a comment in case it may be useful later
3954
+ #{ #PH (Z7) (NC)
3955
+ # Name => 'PrimaryAFPoint',
3956
+ # Condition => '$$self{PhaseDetectAF} == 8 and $$self{AFInfo2Version} =~ /^03/',
3957
+ # Notes => q{
3958
+ # Nikon models with 493-point AF -- 17 rows (A-Q) and 29 columns (1-29), I15
3959
+ # at the center
3960
+ # },
3961
+ # PrintConv => {
3962
+ # 0 => '(none)',
3963
+ # 246 => 'I15 (Center)',
3964
+ # OTHER => sub {
3965
+ # my ($val, $inv) = @_;
3966
+ # return GetAFPointGrid($val, 29, $inv);
3967
+ # },
3968
+ # },
3969
+ #},
3943
3970
  ],
3944
- 0x0a => { #28 (D6) in any of the 3 Group modes on the D6, the points specify the outer boundaries of the focus point area; otherwise the tag value is consistent with other Nikon bodies
3945
- Name => 'AFPointsUsed',
3946
- Condition => '$$self{AFInfo2Version} eq "0301" and $$self{PhaseDetectAF} == 9',
3971
+ 0x0a => [{ #PH (D780)
3972
+ Name => 'AFPointsUsed',
3973
+ Condition => '$$self{PhaseDetectAF} == 1 and $$self{AFInfo2Version} =~ /^03/',
3974
+ Notes => 'newer models with 51-point AF',
3975
+ Format => 'undef[7]',
3976
+ ValueConv => 'join(" ", unpack("H2"x7, $val))',
3977
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
3978
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints51); },
3979
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints51); },
3980
+ },{ #38 (Z6/Z7/Z50)
3981
+ Name => 'AFPointsUsed',
3982
+ Condition => '$$self{PhaseDetectAF} == 8 and $$self{AFInfo2Version} =~ /^03/',
3983
+ Notes => q{
3984
+ models with 81-selectable point AF -- 9 rows (A-I) and 9 columns (1-9) for
3985
+ phase detect AF points. Center point is E5
3986
+ },
3987
+ Format => 'undef[11]',
3988
+ ValueConv => 'join(" ", unpack("H2"x11, $val))',
3989
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
3990
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints81); },
3991
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints81); },
3992
+ },{ #28 (D6) in any of the 3 Group modes on the D6, the points specify the outer boundaries of the focus point area; otherwise the tag value is consistent with other Nikon bodies
3993
+ Name => 'AFPointsUsed',
3994
+ Condition => '$$self{PhaseDetectAF} == 9 and $$self{AFInfo2Version} =~ /^03/',
3947
3995
  Notes => q{
3948
3996
  models with 105-point AF -- 7 rows (A-G) and 15 columns (1-15). Center
3949
3997
  point is D8
@@ -3953,7 +4001,7 @@ my %base64coord = (
3953
4001
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
3954
4002
  PrintConv => sub { PrintAFPoints(shift, \%afPoints105); },
3955
4003
  PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints105); },
3956
- },
4004
+ }],
3957
4005
  0x10 => { #PH (D90 and D5000)
3958
4006
  Name => 'AFImageWidth',
3959
4007
  Condition => '$$self{AFInfo2Version} eq "0100"',
@@ -4180,7 +4228,7 @@ my %base64coord = (
4180
4228
  },
4181
4229
  );
4182
4230
 
4183
- %Image::ExifTool::Nikon::AFInfo2V0400 = ( #V0400 related fields begin at x'3c' ( Z9)
4231
+ %Image::ExifTool::Nikon::AFInfo2V0400 = ( #V0400 related fields begin at x'3c' (Z9)
4184
4232
  %binaryDataAttrs,
4185
4233
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4186
4234
  DATAMEMBER => [ 0 ],
@@ -4224,9 +4272,13 @@ my %base64coord = (
4224
4272
  Name => 'AFAreaHeight',
4225
4273
  Format => 'int16u',
4226
4274
  RawConv => '$val ? $val : undef',
4227
- }
4228
- # AFFocusResult is the result of the last AF operation and not necessarily an indication of the state of the of the capture (e.g., the subject may have moved or the image re-framed)
4229
- #0x4a => { Name => 'AFFocusResult',PrintConv => {0=> "No Focus", 1=>"Focus"} }, #new tag created because Z9 uses a hybrid contrast/phase AF (closest former tag was ContrastDetectAFInFocus).
4275
+ },
4276
+ 0x4a => {
4277
+ Name => 'FocusResult',
4278
+ # in Manual Foucs mode, reflects the state of viewfinder focus indicator.
4279
+ # In AF-C or AF-S, reflects the result of the last AF operation.
4280
+ PrintConv => { 0=> "Out of Focus", 1=>"Focus"},
4281
+ },
4230
4282
  );
4231
4283
 
4232
4284
  # Nikon AF fine-tune information (ref 28)
@@ -4997,9 +5049,10 @@ my %nikonFocalConversions = (
4997
5049
  27 => 'Nikkor Z MC 50mm f/2.8', #IB
4998
5050
  28 => 'Nikkor Z 100-400mm f/4.5-5.6 VR S', #28
4999
5051
  29 => 'Nikkor Z 28mm f/2.8', #IB
5000
- 30 => 'Nikkor Z 400mm f/2.8 TC VR S', #28
5001
- 31 => 'Nikkor Z 24-120 f/4', #28
5002
- 32 => 'Nikkor Z 800mm f/6.3 VR S', #28
5052
+ 30 => 'Nikkor Z 400mm f/2.8 TC VR S', #28
5053
+ 31 => 'Nikkor Z 24-120 f/4', #28
5054
+ 32 => 'Nikkor Z 800mm f/6.3 VR S', #28
5055
+ 36 => 'Nikkor Z 400mm f/4.5 VR S', #IB
5003
5056
  },
5004
5057
  },
5005
5058
  0x35 => { #28
@@ -5043,31 +5096,31 @@ my %nikonFocalConversions = (
5043
5096
  0x4c => { #28
5044
5097
  Name => 'FocusDistanceRangeWidth', #reflects the number of discrete absolute lens positions that are mapped to the reported FocusDistance. Will be 1 near CFD reflecting very narrow focus distance bands (i.e., quite accurate). Near Infinity will be something like 32. Note: 0 at infinity.
5045
5098
  Format => 'int8u',
5046
- Condition => '$$self{NewLensData} and $$self{LensMountType} == 1',
5099
+ Condition => '$$self{NewLensData} and $$self{LensMountType} and $$self{LensMountType} == 1',
5047
5100
  RawConv => '$$self{FocusDistanceRangeWidth} = $val',
5048
5101
  Unknown => 1,
5049
5102
  },
5050
5103
  0x4e => { #28
5051
- Name => 'FocusDistance',
5104
+ Name => 'FocusDistance',
5052
5105
  Format => 'int16u',
5053
- Condition => '$$self{NewLensData} and $$self{LensMountType} == 1',
5106
+ Condition => '$$self{NewLensData} and $$self{LensMountType} and $$self{LensMountType} == 1',
5054
5107
  RawConv => '$val = $val/256', # 1st byte is the fractional component. This byte was not previously considered in the legacy calculation (which only used the 2nd byte). When 2nd byte < 80; distance is < 1 meter
5055
5108
  ValueConv => '0.01 * 10**($val/40)', # in m
5056
5109
  ValueConvInv => '$val>0 ? 40*log($val*100)/log(10) : 0',
5057
5110
  PrintConv => q{
5058
- $$self{FocusDistanceRangeWidth} == 0 ? "Inf" : $val < 1 ? $val < 0.35 ? sprintf("%.4f m", $val): sprintf("%.3f m", $val): sprintf("%.2f m", $val), #distances less than 35mm are quite accurate with increasingly less precision past 1m
5111
+ (defined $$self{FocusDistanceRangeWidth} and not $$self{FocusDistanceRangeWidth}) ? "Inf" : $val < 1 ? $val < 0.35 ? sprintf("%.4f m", $val): sprintf("%.3f m", $val): sprintf("%.2f m", $val), #distances less than 35mm are quite accurate with increasingly less precision past 1m
5059
5112
  },
5060
5113
  },
5061
5114
  0x56 => { #28
5062
5115
  Name => 'LensDriveEnd', # byte contains: 1 at CFD/MOD; 2 at Infinity; 0 otherwise
5063
- Condition => '$$self{NewLensData} and $$self{LensMountType} == 1',
5116
+ Condition => '$$self{NewLensData} and $$self{LensMountType} and $$self{LensMountType} == 1',
5064
5117
  Format => 'int8u',
5065
- RawConv => 'unless ($$self{FocusDistanceRangeWidth} == 0 ) { if ($val == 0 ) {$$self{LensDriveEnd} = "No"} else { $$self{LensDriveEnd} = "CFD"}; } else{ $$self{LensDriveEnd} = "Inf"}',
5118
+ RawConv => 'unless (defined $$self{FocusDistanceRangeWidth} and not $$self{FocusDistanceRangeWidth}) { if ($val == 0 ) {$$self{LensDriveEnd} = "No"} else { $$self{LensDriveEnd} = "CFD"}; } else{ $$self{LensDriveEnd} = "Inf"}',
5066
5119
  Unknown => 1,
5067
5120
  },
5068
5121
  0x5a => { #28
5069
5122
  Name => 'LensPositionAbsolute', # <=0 at infinity. Typical value at CFD might be 58000. Only valid for Z-mount lenses.
5070
- Condition => '$$self{NewLensData} and $$self{LensMountType} == 1',
5123
+ Condition => '$$self{NewLensData} and $$self{LensMountType} and $$self{LensMountType} == 1',
5071
5124
  Format => 'int32s',
5072
5125
  Unknown => 1,
5073
5126
  },
@@ -5472,14 +5525,14 @@ my %nikonFocalConversions = (
5472
5525
  },
5473
5526
  0x27d => {
5474
5527
  Name => 'ShutterCount',
5475
- Condition => '$$self{FirmwareVersion} =~ /^1.01/',
5528
+ Condition => '$$self{FirmwareVersion} =~ /^1\.01/',
5476
5529
  Notes => 'firmware 1.10',
5477
5530
  Format => 'int32u',
5478
5531
  Priority => 0,
5479
5532
  },
5480
5533
  0x27f => {
5481
5534
  Name => 'ShutterCount',
5482
- Condition => '$$self{FirmwareVersion} =~ /^2.0/',
5535
+ Condition => '$$self{FirmwareVersion} =~ /^2\.0/',
5483
5536
  Notes => 'firmware 2.00, 2.01 and 2.02',
5484
5537
  Format => 'int32u',
5485
5538
  Priority => 0,
@@ -7373,7 +7426,7 @@ my %nikonFocalConversions = (
7373
7426
  # (moves around too much and doesn't fit cleanly in the offset table)
7374
7427
  #0x38be => {
7375
7428
  # Name => 'Rotation',
7376
- # Condition => '$$self{FirmwareVersion} =~ /^1.0/',
7429
+ # Condition => '$$self{FirmwareVersion} =~ /^1\.0/',
7377
7430
  # Mask => 0x30,
7378
7431
  # PrintConv => {
7379
7432
  # 0 => 'Horizontal',
@@ -7679,7 +7732,7 @@ my %nikonFocalConversions = (
7679
7732
  },
7680
7733
  0x189d => { #PH (NC)
7681
7734
  Name => 'CustomSettingsD4S',
7682
- Condition => '$$self{FirmwareVersion} =~ /^1.00/',
7735
+ Condition => '$$self{FirmwareVersion} =~ /^1\.00/',
7683
7736
  Notes => 'firmware version 1.00',
7684
7737
  Format => 'undef[56]',
7685
7738
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsD4' },
@@ -7687,7 +7740,7 @@ my %nikonFocalConversions = (
7687
7740
  0x18c2 => { # CSf1-c (no idea why it is so far away from the rest of the settings)
7688
7741
  Name => 'MultiSelectorLiveViewMode',
7689
7742
  Groups => { 1 => 'NikonCustom' },
7690
- Condition => '$$self{FirmwareVersion} !~ /^1.00/',
7743
+ Condition => '$$self{FirmwareVersion} !~ /^1\.00/',
7691
7744
  Mask => 0xc0,
7692
7745
  PrintConv => {
7693
7746
  0 => 'Reset',
@@ -7788,7 +7841,7 @@ my %nikonFocalConversions = (
7788
7841
  },
7789
7842
  0x193d => {
7790
7843
  Name => 'CustomSettingsD4S',
7791
- Condition => '$$self{FirmwareVersion} !~ /^1.00/',
7844
+ Condition => '$$self{FirmwareVersion} !~ /^1\.00/',
7792
7845
  Notes => 'firmware version 1.01',
7793
7846
  Format => 'undef[56]',
7794
7847
  SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsD4' },
@@ -8041,8 +8094,8 @@ my %nikonFocalConversions = (
8041
8094
  WRITE_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
8042
8095
  CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
8043
8096
  VARS => { ID_LABEL => 'Index' },
8044
- DATAMEMBER => [ 0x04, 0x30, 0x38, 0x84, 0x8c, 0x6c6f, 0x6c98,
8045
- 0x6c9a, 0x7717, 0x7844, 0xeaea, 0xeb6f, 0xeb70 ],
8097
+ DATAMEMBER => [ 0x04, 0x30, 0x38, 0x84, 0x8c, 0x6c6f, 0x6c90, 0x6c98,
8098
+ 0x6c9a, 0xeaea, 0xeb6f, 0xeb70 ],
8046
8099
  IS_SUBDIR => [ 0xec4b ],
8047
8100
  WRITABLE => 1,
8048
8101
  FIRST_ENTRY => 0,
@@ -8119,6 +8172,15 @@ my %nikonFocalConversions = (
8119
8172
  # account for variable location of Offset3 data
8120
8173
  Hook => '$varSize = $$self{Offset3} - 0x6c70',
8121
8174
  },
8175
+ 0x6c90 => {
8176
+ Name => 'FocusShiftShooting',
8177
+ RawConv => '$$self{FocusShiftShooting} = $val',
8178
+ PrintConv => q{
8179
+ return 'Off' if $val == 0 ;
8180
+ my $i = sprintf("Frame %.0f of %.0f",$val, $$self{FocusShiftNumberShots}); # something like Frame 1 of 100"
8181
+ return "On: $i"
8182
+ },
8183
+ },
8122
8184
  0x6c98 => {
8123
8185
  Name => 'IntervalShooting',
8124
8186
  RawConv => '$$self{IntervalShooting} = $val',
@@ -8138,23 +8200,6 @@ my %nikonFocalConversions = (
8138
8200
  Format => 'int16u',
8139
8201
  Hidden => 1,
8140
8202
  },
8141
- ### 0x7718 - Offset5 info start (Z9 firmware 1.00)
8142
- 0x7717 => {
8143
- Name => 'Offsset5Hook',
8144
- Hidden => 1,
8145
- RawConv => 'undef',
8146
- # account for variable location of Offset5 data
8147
- Hook => '$varSize = $$self{Offset5} - 0x7718',
8148
- },
8149
- 0x7844 => {
8150
- Name => 'FocusShiftShooting',
8151
- RawConv => '$$self{FocusShiftShooting} = $val',
8152
- PrintConv => q{
8153
- return 'Off' if $val == 0 ;
8154
- my $i = sprintf("Frame %.0f of %.0f",$val, $$self{FocusShiftNumberShots}); # something like Frame 1 of 100"
8155
- return "On: $i"
8156
- },
8157
- },
8158
8203
  ### 0xeaeb - OrientationInfo start (Z9 firmware 1.00)
8159
8204
  0xeaea => {
8160
8205
  Name => 'OrientationHook',
@@ -8208,6 +8253,7 @@ my %nikonFocalConversions = (
8208
8253
  0xec4b => {
8209
8254
  Name => 'MenuSettingsZ9',
8210
8255
  Format => 'undef[1646]',
8256
+ Condition => '$$self{FirmwareVersion} lt "03.00"',
8211
8257
  SubDirectory => {
8212
8258
  TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ9',
8213
8259
  },
@@ -8801,9 +8847,9 @@ my %nikonFocalConversions = (
8801
8847
  16 => '+03:00 (Moscow, Nairobi)',
8802
8848
  17 => '+02:00 (Athens, Helsinki)',
8803
8849
  18 => '+01:00 (Madrid, Paris, Berlin)',
8804
- 19 => '+00:00 (London)',
8805
- 20 => '-01:00 (Azores)',
8806
- 21 => '-02:00 (Fernando de Noronha)',
8850
+ 19 => '+00:00 (London)',
8851
+ 20 => '-01:00 (Azores)',
8852
+ 21 => '-02:00 (Fernando de Noronha)',
8807
8853
  22 => '-03:00 (Buenos Aires, Sao Paulo)',
8808
8854
  23 => '-03:30 (Newfoundland)',
8809
8855
  24 => '-04:00 (Manaus, Caracas)',
@@ -10131,6 +10177,36 @@ my %nikonFocalConversions = (
10131
10177
  },
10132
10178
  );
10133
10179
 
10180
+ # Multi exposure2 / image overlay information (ref 39)
10181
+ %Image::ExifTool::Nikon::MultiExposure2 = (
10182
+ %binaryDataAttrs,
10183
+ FORMAT => 'int32u',
10184
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
10185
+ 0 => {
10186
+ Name => 'MultiExposureVersion',
10187
+ Format => 'string[4]',
10188
+ Writable => 0,
10189
+ },
10190
+ 1 => {
10191
+ Name => 'MultiExposureMode',
10192
+ PrintConv => {
10193
+ 0 => 'Off',
10194
+ 1 => 'Multiple Exposure',
10195
+ 3 => 'HDR',
10196
+ },
10197
+ },
10198
+ 2 => 'MultiExposureShots',
10199
+ 3 => {
10200
+ Name => 'MultiExposureOverlayMode',
10201
+ PrintConv => {
10202
+ 0 => 'Add',
10203
+ 1 => 'Average',
10204
+ 2 => 'Light',
10205
+ 3 => 'Dark',
10206
+ },
10207
+ },
10208
+ );
10209
+
10134
10210
  # HDR information (ref 32)
10135
10211
  %Image::ExifTool::Nikon::HDRInfo = (
10136
10212
  %binaryDataAttrs,
@@ -10139,12 +10215,13 @@ my %nikonFocalConversions = (
10139
10215
  0 => {
10140
10216
  Name => 'HDRInfoVersion',
10141
10217
  Format => 'string[4]',
10218
+ Writable => 0,
10142
10219
  },
10143
10220
  4 => {
10144
10221
  Name => 'HDR',
10145
10222
  PrintConv => {
10146
10223
  0 => 'Off',
10147
- 1 => 'On',
10224
+ 1 => 'On (normal)',
10148
10225
  48 => 'Auto', #PH (NC)
10149
10226
  },
10150
10227
  },
@@ -10182,6 +10259,35 @@ my %nikonFocalConversions = (
10182
10259
  },
10183
10260
  );
10184
10261
 
10262
+ # ref 39 (Z9)
10263
+ %Image::ExifTool::Nikon::HDRInfo2 = (
10264
+ %binaryDataAttrs,
10265
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
10266
+ 0 => {
10267
+ Name => 'HDRInfoVersion', # 0200
10268
+ Format => 'string[4]',
10269
+ Writable => 0,
10270
+ },
10271
+ 4 => {
10272
+ Name => 'HDR',
10273
+ PrintConv => {
10274
+ 0 => 'Off',
10275
+ 1 => 'On (normal)',
10276
+ },
10277
+ },
10278
+ 5 => {
10279
+ Name => 'HDRLevel',
10280
+ PrintConv => {
10281
+ 0 => 'n/a',
10282
+ 1 => 'Normal',
10283
+ 2 => 'Low',
10284
+ 3 => 'High',
10285
+ 4 => 'High+',
10286
+ 5 => 'Auto',
10287
+ },
10288
+ },
10289
+ );
10290
+
10185
10291
  # location information (ref PH)
10186
10292
  %Image::ExifTool::Nikon::LocationInfo = (
10187
10293
  %binaryDataAttrs,
@@ -10902,9 +11008,14 @@ my %nikonFocalConversions = (
10902
11008
  Name => 'LocationInfo',
10903
11009
  SubDirectory => { TagTable => 'Image::ExifTool::Nikon::LocationInfo' },
10904
11010
  },
11011
+ 0x200003f => 'WhiteBalanceFineTune',
10905
11012
  # 0x200003f - rational64s[2]: "0 0"
10906
11013
  # 0x2000042 - undef[6]: "0100\x03\0"
10907
11014
  # 0x2000043 - undef[12]: all zeros
11015
+ 0x200004e => {
11016
+ Name => 'NikonSettings',
11017
+ SubDirectory => { TagTable => 'Image::ExifTool::NikonSettings::Main' },
11018
+ },
10908
11019
  0x2000083 => {
10909
11020
  Name => 'LensType',
10910
11021
  # credit to Tom Christiansen (ref 7) for figuring this out...
@@ -2036,11 +2036,13 @@ sub ProcessNikonSettings($$$)
2036
2036
  for ($i=0; $i<$num; ++$i) {
2037
2037
  my $entry = $start + 0x18 + $i * 8;
2038
2038
  my $tag = Get16u($dataPt, $entry);
2039
- my $fmt = Get16u($dataPt, $entry + 2);
2039
+ # this is odd, but either the format is 16-bit and always big-endian,
2040
+ # or it is 8-bit and we have an unknown byte in the entry...
2041
+ my $fmt = Get8u($dataPt, $entry + 3);
2040
2042
  my $val = Get32u($dataPt, $entry + 4);
2041
2043
  # abort if the tag has a format that we haven't yet seen
2042
- # (assuming this is a size/format code. So far we have only seen 0x400)
2043
- $fmt == 0x400 or $et->Warn(sprintf('Unknown format 0x%x for NikonSettings tag 0x%.4x',$fmt,$tag)), last;
2044
+ # (assuming this is a size/format code. So far we have only seen a code of 4)
2045
+ $fmt == 4 or $et->Warn(sprintf('Unknown format $fmt for NikonSettings tag 0x%.4x',$tag)), last;
2044
2046
  $et->HandleTag($tagTablePtr, $tag, $val,
2045
2047
  DataPt => $dataPt,
2046
2048
  DataPos => $$dirInfo{DataPos},
@@ -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.78';
43
+ $VERSION = '2.79';
44
44
 
45
45
  sub PrintLensInfo($$$);
46
46
 
@@ -433,6 +433,7 @@ my %olympusCameraTypes = (
433
433
  S0092 => 'E-M1MarkIII', #IB
434
434
  S0093 => 'E-P7', #IB
435
435
  S0095 => 'OM-1', #IB
436
+ S0101 => 'OM-5', #IB
436
437
  SR45 => 'D220',
437
438
  SR55 => 'D320L',
438
439
  SR83 => 'D340L',