exiftool_vendored 11.97.0 → 12.09.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of exiftool_vendored might be problematic. Click here for more details.

Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +196 -2
  3. data/bin/MANIFEST +8 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +43 -42
  7. data/bin/exiftool +150 -102
  8. data/bin/lib/Image/ExifTool.pm +162 -111
  9. data/bin/lib/Image/ExifTool.pod +123 -90
  10. data/bin/lib/Image/ExifTool/AIFF.pm +2 -2
  11. data/bin/lib/Image/ExifTool/APE.pm +2 -2
  12. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +21 -10
  13. data/bin/lib/Image/ExifTool/Canon.pm +201 -14
  14. data/bin/lib/Image/ExifTool/CanonCustom.pm +82 -16
  15. data/bin/lib/Image/ExifTool/DPX.pm +56 -2
  16. data/bin/lib/Image/ExifTool/DarwinCore.pm +22 -3
  17. data/bin/lib/Image/ExifTool/EXE.pm +8 -5
  18. data/bin/lib/Image/ExifTool/Exif.pm +15 -6
  19. data/bin/lib/Image/ExifTool/Font.pm +9 -2
  20. data/bin/lib/Image/ExifTool/GIF.pm +6 -1
  21. data/bin/lib/Image/ExifTool/GeoTiff.pm +2 -0
  22. data/bin/lib/Image/ExifTool/Geotag.pm +2 -2
  23. data/bin/lib/Image/ExifTool/GoPro.pm +48 -22
  24. data/bin/lib/Image/ExifTool/H264.pm +1 -1
  25. data/bin/lib/Image/ExifTool/HtmlDump.pm +2 -2
  26. data/bin/lib/Image/ExifTool/ID3.pm +91 -12
  27. data/bin/lib/Image/ExifTool/IPTC.pm +1 -0
  28. data/bin/lib/Image/ExifTool/JSON.pm +27 -4
  29. data/bin/lib/Image/ExifTool/Lang/de.pm +3 -1
  30. data/bin/lib/Image/ExifTool/Lang/es.pm +1 -1
  31. data/bin/lib/Image/ExifTool/M2TS.pm +44 -24
  32. data/bin/lib/Image/ExifTool/MacOS.pm +152 -38
  33. data/bin/lib/Image/ExifTool/Matroska.pm +3 -1
  34. data/bin/lib/Image/ExifTool/Minolta.pm +7 -2
  35. data/bin/lib/Image/ExifTool/MinoltaRaw.pm +11 -10
  36. data/bin/lib/Image/ExifTool/Nikon.pm +163 -18
  37. data/bin/lib/Image/ExifTool/Olympus.pm +39 -17
  38. data/bin/lib/Image/ExifTool/PNG.pm +14 -3
  39. data/bin/lib/Image/ExifTool/PPM.pm +5 -5
  40. data/bin/lib/Image/ExifTool/Panasonic.pm +148 -14
  41. data/bin/lib/Image/ExifTool/PanasonicRaw.pm +34 -0
  42. data/bin/lib/Image/ExifTool/Parrot.pm +2 -1
  43. data/bin/lib/Image/ExifTool/Pentax.pm +3 -1
  44. data/bin/lib/Image/ExifTool/Photoshop.pm +2 -1
  45. data/bin/lib/Image/ExifTool/QuickTime.pm +294 -34
  46. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +419 -60
  47. data/bin/lib/Image/ExifTool/README +26 -22
  48. data/bin/lib/Image/ExifTool/RIFF.pm +15 -3
  49. data/bin/lib/Image/ExifTool/RSRC.pm +17 -11
  50. data/bin/lib/Image/ExifTool/RTF.pm +12 -7
  51. data/bin/lib/Image/ExifTool/Radiance.pm +7 -2
  52. data/bin/lib/Image/ExifTool/Ricoh.pm +19 -1
  53. data/bin/lib/Image/ExifTool/Shift.pl +1 -0
  54. data/bin/lib/Image/ExifTool/SigmaRaw.pm +40 -33
  55. data/bin/lib/Image/ExifTool/Sony.pm +420 -34
  56. data/bin/lib/Image/ExifTool/TagLookup.pm +5799 -5671
  57. data/bin/lib/Image/ExifTool/TagNames.pod +583 -95
  58. data/bin/lib/Image/ExifTool/Validate.pm +4 -4
  59. data/bin/lib/Image/ExifTool/WriteExif.pl +3 -2
  60. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +26 -18
  61. data/bin/lib/Image/ExifTool/Writer.pl +44 -21
  62. data/bin/lib/Image/ExifTool/XMP.pm +99 -17
  63. data/bin/lib/Image/ExifTool/XMPStruct.pl +3 -1
  64. data/bin/lib/Image/ExifTool/ZISRAW.pm +123 -0
  65. data/bin/perl-Image-ExifTool.spec +42 -41
  66. data/lib/exiftool_vendored/version.rb +1 -1
  67. metadata +8 -7
@@ -17,7 +17,7 @@ use vars qw($VERSION);
17
17
  use Image::ExifTool qw(:DataAccess :Utils);
18
18
  use Image::ExifTool::Minolta;
19
19
 
20
- $VERSION = '1.15';
20
+ $VERSION = '1.16';
21
21
 
22
22
  sub ProcessMRW($$;$);
23
23
  sub WriteMRW($$;$);
@@ -59,10 +59,12 @@ sub WriteMRW($$;$);
59
59
  CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
60
60
  WRITABLE => 1,
61
61
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
62
+ DATAMEMBER => [ 0 ],
62
63
  FIRST_ENTRY => 0,
63
64
  0 => {
64
65
  Name => 'FirmwareID',
65
66
  Format => 'string[8]',
67
+ RawConv => '$$self{MinoltaPRD} = 1 if $$self{FILE_TYPE} eq "MRW"; $val', # used in decoding RIF info
66
68
  },
67
69
  8 => {
68
70
  Name => 'SensorHeight',
@@ -214,38 +216,37 @@ sub WriteMRW($$;$);
214
216
  PrintConv => \%Image::ExifTool::Minolta::sonyColorMode,
215
217
  },
216
218
  ],
217
- # NOTE: some of these WB_RBLevels may apply to other models too...
219
+ # NOTE: WB_RBLevels up to Custom also apply to Minolta models which write PRD info (ref IB)
218
220
  8 => { #3
219
221
  Name => 'WB_RBLevelsTungsten',
220
- Condition => '$$self{Model} eq "DSLR-A100"',
222
+ Condition => '$$self{Model} eq "DSLR-A100" or $$self{MinoltaPRD}',
221
223
  Format => 'int16u[2]',
222
224
  Notes => 'these WB_RBLevels currently decoded only for the Sony A100',
223
225
  },
224
226
  12 => { #3
225
227
  Name => 'WB_RBLevelsDaylight',
226
- Condition => '$$self{Model} eq "DSLR-A100"',
228
+ Condition => '$$self{Model} eq "DSLR-A100" or $$self{MinoltaPRD}',
227
229
  Format => 'int16u[2]',
228
230
  },
229
231
  16 => { #3
230
232
  Name => 'WB_RBLevelsCloudy',
231
- Condition => '$$self{Model} eq "DSLR-A100"',
233
+ Condition => '$$self{Model} eq "DSLR-A100" or $$self{MinoltaPRD}',
232
234
  Format => 'int16u[2]',
233
235
  },
234
236
  20 => { #3
235
237
  Name => 'WB_RBLevelsCoolWhiteF',
236
- Condition => '$$self{Model} eq "DSLR-A100"',
238
+ Condition => '$$self{Model} eq "DSLR-A100" or $$self{MinoltaPRD}',
237
239
  Format => 'int16u[2]',
238
240
  },
239
241
  24 => { #3
240
242
  Name => 'WB_RBLevelsFlash',
241
- Condition => '$$self{Model} eq "DSLR-A100"',
243
+ Condition => '$$self{Model} eq "DSLR-A100" or $$self{MinoltaPRD}',
242
244
  Format => 'int16u[2]',
243
245
  },
244
246
  28 => { #3
245
- Name => 'WB_RBLevelsUnknown',
246
- Condition => '$$self{Model} eq "DSLR-A100"',
247
+ Name => 'WB_RBLevelsCustom', #IB
248
+ Condition => '$$self{Model} eq "DSLR-A100" or $$self{MinoltaPRD}',
247
249
  Format => 'int16u[2]',
248
- Unknown => 1,
249
250
  },
250
251
  32 => { #3
251
252
  Name => 'WB_RBLevelsShade',
@@ -62,7 +62,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
62
62
  use Image::ExifTool::Exif;
63
63
  use Image::ExifTool::GPS;
64
64
 
65
- $VERSION = '3.81';
65
+ $VERSION = '3.88';
66
66
 
67
67
  sub LensIDConv($$$);
68
68
  sub ProcessNikonAVI($$$);
@@ -297,6 +297,7 @@ sub GetAFPointGrid($$;$);
297
297
  'B8 40 2D 44 2C 34 BA 06' => 'AF-S Nikkor 18-35mm f/3.5-4.5G ED',
298
298
  'A0 40 2D 74 2C 3C BB 0E' => 'AF-S DX Nikkor 18-140mm f/3.5-5.6G ED VR', #PH
299
299
  'A1 54 55 55 0C 0C BC 06' => 'AF-S Nikkor 58mm f/1.4G', #IB
300
+ 'A1 48 6E 8E 24 24 DB 4E' => 'AF-S Nikkor 120-300mm f/2.8E FL ED SR VR', #28
300
301
  'A2 40 2D 53 2C 3C BD 0E' => 'AF-S DX Nikkor 18-55mm f/3.5-5.6G VR II',
301
302
  'A4 40 2D 8E 2C 40 BF 0E' => 'AF-S DX Nikkor 18-300mm f/3.5-6.3G ED VR',
302
303
  'A5 4C 44 44 14 14 C0 06' => 'AF-S Nikkor 35mm f/1.8G ED', #35 ("ED" ref 11)
@@ -348,6 +349,7 @@ sub GetAFPointGrid($$;$);
348
349
  'FE 47 00 00 24 24 4B 06' => 'Sigma 4.5mm F2.8 EX DC HSM Circular Fisheye', #JD
349
350
  '26 48 11 11 30 30 1C 02' => 'Sigma 8mm F4 EX Circular Fisheye',
350
351
  '79 40 11 11 2C 2C 1C 06' => 'Sigma 8mm F3.5 EX Circular Fisheye', #JD
352
+ 'DB 40 11 11 2C 2C 1C 06' => 'Sigma 8mm F3.5 EX DG Circular Fisheye', #30
351
353
  'DC 48 19 19 24 24 4B 06' => 'Sigma 10mm F2.8 EX DC HSM Fisheye',
352
354
  'C2 4C 24 24 14 14 4B 06' => 'Sigma 14mm F1.8 DG HSM | A', #IB
353
355
  '48 48 24 24 24 24 4B 02' => 'Sigma 14mm F2.8 EX Aspherical HSM',
@@ -448,6 +450,7 @@ sub GetAFPointGrid($$;$);
448
450
  # '92 3E 2D 88 2C 40 4B 0E' (22mm)
449
451
  # '92 40 2D 88 2C 40 4B 0E' (18mm)
450
452
  '26 48 31 49 24 24 1C 02' => 'Sigma 20-40mm F2.8',
453
+ '7B 48 37 44 18 18 4B 06' => 'Sigma 24-35mm F2.0 DG HSM | A', #30
451
454
  '02 3A 37 50 31 3D 02 00' => 'Sigma 24-50mm F4-5.6 UC',
452
455
  '26 48 37 56 24 24 1C 02' => 'Sigma 24-60mm F2.8 EX DG',
453
456
  'B6 48 37 56 24 24 1C 02' => 'Sigma 24-60mm F2.8 EX DG',
@@ -512,6 +515,7 @@ sub GetAFPointGrid($$;$);
512
515
  'CE 34 76 A0 38 40 4B 0E' => 'Sigma 150-500mm F5-6.3 DG OS APO HSM', #JD
513
516
  '81 34 76 A6 38 40 4B 0E' => 'Sigma 150-600mm F5-6.3 DG OS HSM | S', #Jaap Voets
514
517
  '82 34 76 A6 38 40 4B 0E' => 'Sigma 150-600mm F5-6.3 DG OS HSM | C',
518
+ 'C4 4C 73 73 14 14 4B 46' => 'Sigma 135mm F1.8 DG HSM | A', #forum3833
515
519
  '26 40 7B A0 34 40 1C 02' => 'Sigma APO 170-500mm F5-6.3 Aspherical RF',
516
520
  'A7 49 80 A0 24 24 4B 06' => 'Sigma APO 200-500mm F2.8 EX DG',
517
521
  '48 3C 8E B0 3C 3C 4B 02' => 'Sigma APO 300-800mm F5.6 EX DG HSM',
@@ -578,6 +582,7 @@ sub GetAFPointGrid($$;$);
578
582
  '4D 41 3C 8E 2B 40 62 02' => 'Tamron AF 28-300mm f/3.5-6.3 XR Di LD Aspherical (IF) (A061)',
579
583
  '4D 41 3C 8E 2C 40 62 02' => 'Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical (IF) (185D)',
580
584
  'F9 40 3C 8E 2C 40 40 0E' => 'Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical (IF) Macro (A20)',
585
+ 'C9 3C 44 76 25 31 DF 4E' => 'Tamron 35-150mm f/2.8-4 Di VC OSD (A043)', #30
581
586
  '00 47 53 80 30 3C 00 06' => 'Tamron AF 55-200mm f/4-5.6 Di II LD (A15)',
582
587
  'F7 53 5C 80 24 24 84 06' => 'Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)',
583
588
  'FE 53 5C 80 24 24 84 06' => 'Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)',
@@ -652,6 +657,7 @@ sub GetAFPointGrid($$;$);
652
657
  '00 40 64 64 2C 2C 00 00' => 'Voigtlander APO-Lanthar 90mm F3.5 SLII Close Focus',
653
658
  #
654
659
  '00 40 2D 2D 2C 2C 00 00' => 'Carl Zeiss Distagon T* 3.5/18 ZF.2',
660
+ '00 48 27 27 24 24 00 00' => 'Carl Zeiss Distagon T* 2.8/15 ZF.2', #MykytaKozlov
655
661
  '00 48 32 32 24 24 00 00' => 'Carl Zeiss Distagon T* 2.8/21 ZF.2',
656
662
  '00 54 38 38 18 18 00 00' => 'Carl Zeiss Distagon T* 2/25 ZF.2',
657
663
  '00 54 3C 3C 18 18 00 00' => 'Carl Zeiss Distagon T* 2/28 ZF.2',
@@ -709,6 +715,7 @@ sub GetAFPointGrid($$;$);
709
715
  '00 48 80 80 30 30 00 00' => 'Nikkor 200mm f/4 AiS',
710
716
  '00 40 11 11 2C 2C 00 00' => 'Samyang 8mm f/3.5 Fish-Eye',
711
717
  '00 58 64 64 20 20 00 00' => 'Soligor C/D Macro MC 90mm f/2.5',
718
+ '4A 58 30 30 14 0C 4D 02' => 'Rokinon 20mm f/1.8 ED AS UMC', #30
712
719
  );
713
720
 
714
721
  # text encoding used in LocationInfo (ref PH)
@@ -876,6 +883,38 @@ my %afPoints39 = (
876
883
  10 => 'E3', 20 => 'B9', 30 => 'D4',
877
884
  );
878
885
 
886
+ # AF point indices for models with 105 focus points, eg. D6 (ref 28)
887
+ # - 7 rows (A-G) with 15 columns (1-15), center is D8
888
+ my %afPoints105 = (
889
+ 1 => 'D8', 28 => 'G7', 55 => 'F13', 82 => 'E4',
890
+ 2 => 'C8', 29 => 'D6', 56 => 'G13', 83 => 'F4',
891
+ 3 => 'B8', 30 => 'C6', 57 => 'D14', 84 => 'G4',
892
+ 4 => 'A8', 31 => 'B6', 58 => 'C14', 85 => 'D3',
893
+ 5 => 'E8', 32 => 'A6', 59 => 'B14', 86 => 'C3',
894
+ 6 => 'F8', 33 => 'E6', 60 => 'A14', 87 => 'B3',
895
+ 7 => 'G8', 34 => 'F6', 61 => 'E14', 88 => 'A3',
896
+ 8 => 'D9', 35 => 'G6', 62 => 'F14', 89 => 'E3',
897
+ 9 => 'C9', 36 => 'D11', 63 => 'G14', 90 => 'F3',
898
+ 10 => 'B9', 37 => 'C11', 64 => 'D15', 91 => 'G3',
899
+ 11 => 'A9', 38 => 'B11', 65 => 'C15', 92 => 'D2',
900
+ 12 => 'E9', 39 => 'A11', 66 => 'B15', 93 => 'C2',
901
+ 13 => 'F9', 40 => 'E11', 67 => 'A15', 94 => 'B2',
902
+ 14 => 'G9', 41 => 'F11', 68 => 'E15', 95 => 'A2',
903
+ 15 => 'D10', 42 => 'G11', 69 => 'F15', 96 => 'E2',
904
+ 16 => 'C10', 43 => 'D12', 70 => 'G15', 97 => 'F2',
905
+ 17 => 'B10', 44 => 'C12', 71 => 'D5', 98 => 'G2',
906
+ 18 => 'A10', 45 => 'B12', 72 => 'C5', 99 => 'D1',
907
+ 19 => 'E10', 46 => 'A12', 73 => 'B5', 100 => 'C1',
908
+ 20 => 'F10', 47 => 'E12', 74 => 'A5', 101 => 'B1',
909
+ 21 => 'G10', 48 => 'F12', 75 => 'E5', 102 => 'A1',
910
+ 22 => 'D7', 49 => 'G12', 76 => 'F5', 103 => 'E1',
911
+ 23 => 'C7', 50 => 'D13', 77 => 'G5', 104 => 'F1',
912
+ 24 => 'B7', 51 => 'C13', 78 => 'D4', 105 => 'G1',
913
+ 25 => 'A7', 52 => 'B13', 79 => 'C4',
914
+ 26 => 'E7', 53 => 'A13', 80 => 'B4',
915
+ 27 => 'F7', 54 => 'E13', 81 => 'A4',
916
+ );
917
+
879
918
  # AF point indices for models with 135 focus points, eg. 1J1 (ref PH)
880
919
  # - 9 rows (A-I) with 15 columns (1-15), center is E8
881
920
  # - odd columns, columns 2 and 14, and the remaining corner points are
@@ -1538,7 +1577,7 @@ my %binaryDataAttrs = (
1538
1577
  0x008c => {
1539
1578
  Name => 'ContrastCurve', #JD
1540
1579
  Writable => 'undef',
1541
- Flags => [ 'Binary', 'Protected' ],
1580
+ Flags => [ 'Binary', 'Protected', 'Drop' ], # (drop because not found in Nikon JPEG's)
1542
1581
  },
1543
1582
  # ColorHue: MODE1/MODE1a=sRGB, MODE2=Adobe RGB, MODE3a=more saturated sRGB
1544
1583
  # --> should really be called ColorSpace or ColorMode, but that would conflict with other tags
@@ -1693,7 +1732,8 @@ my %binaryDataAttrs = (
1693
1732
  SubDirectory => {
1694
1733
  TagTable => 'Image::ExifTool::Nikon::ShotInfoD850',
1695
1734
  DecryptStart => 4,
1696
- DecryptLen => 0x2f07,
1735
+ DecryptLen => 0x2efb + 12,
1736
+ DecryptMore => 'Get32u(\$data, 0xa0) + 12',
1697
1737
  ByteOrder => 'LittleEndian',
1698
1738
  },
1699
1739
  },
@@ -1782,6 +1822,16 @@ my %binaryDataAttrs = (
1782
1822
  ByteOrder => 'LittleEndian',
1783
1823
  },
1784
1824
  },
1825
+ { # (D6 firmware version 1.00, ref 28)
1826
+ Condition => '$$valPt =~ /^0246/',
1827
+ Name => 'ShotInfoD6',
1828
+ SubDirectory => {
1829
+ TagTable => 'Image::ExifTool::Nikon::ShotInfo',
1830
+ DecryptStart => 4,
1831
+ DecryptLen => 0xa4, # only decrypt the version info & offset fields for now
1832
+ ByteOrder => 'LittleEndian',
1833
+ },
1834
+ },
1785
1835
  { # (D610 firmware version 1.00)
1786
1836
  Condition => '$$valPt =~ /^0232/',
1787
1837
  Name => 'ShotInfoD610',
@@ -1831,6 +1881,7 @@ my %binaryDataAttrs = (
1831
1881
  7 => 'Unpacked 12 bits', #IB (padded to 16)
1832
1882
  8 => 'Small', #IB
1833
1883
  9 => 'Packed 12 bits', #IB (2 pixels in 3 bytes)
1884
+ 10 => 'Packed 14 bits', #28 (4 pixels in 7 bytes, eg. D6 uncompressed 14 bit)
1834
1885
  },
1835
1886
  },
1836
1887
  0x0094 => { Name => 'SaturationAdj', Writable => 'int16s' },
@@ -3297,6 +3348,7 @@ my %binaryDataAttrs = (
3297
3348
  15 => 'Dynamic Area (72 points)', #PH
3298
3349
  16 => 'Group Area (HL)', #28
3299
3350
  17 => 'Group Area (VL)', #28
3351
+ 18 => 'Dynamic Area (49 points)', #28
3300
3352
  128 => 'Single', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V2,1V3)
3301
3353
  129 => 'Auto (41 points)', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V1,1V2,1V3,AW1)
3302
3354
  130 => 'Subject Tracking (41 points)', #PH (1J1,1J4,1J3)
@@ -3334,6 +3386,10 @@ my %binaryDataAttrs = (
3334
3386
  197 => 'Auto', #PH (Z7)
3335
3387
  198 => 'Auto (198)', #PH (Z7) (focus lock with AF-C maybe?)
3336
3388
  199 => 'Auto (focus lock)', #PH (Z7, AF-S)
3389
+ 200 => 'Normal-area AF', #28 (D6)
3390
+ 201 => 'Wide-area AF', #28 (D6)
3391
+ 202 => 'Face-priority AF', #28 (D6)
3392
+ 203 => 'Subject-tracking AF', #28 (D6)
3337
3393
  },
3338
3394
  },
3339
3395
  ],
@@ -3352,12 +3408,14 @@ my %binaryDataAttrs = (
3352
3408
  6 => 'On (105-point)', #PH (1J4/1V3[128/130])
3353
3409
  7 => 'On (153-point)', #PH (D5/D500/D850)
3354
3410
  8 => 'On (81-point)', #38
3411
+ 9 => 'On (105-point)', #28 (D6)
3355
3412
  },
3356
3413
  },
3357
3414
  7 => [
3358
3415
  { #PH/JD
3359
3416
  Name => 'PrimaryAFPoint',
3360
- Condition => '$$self{PhaseDetectAF} < 2',
3417
+ # PrimaryAFPoint may only be valid for PhaseDetect - certainly true on the D6, possibly other bodies? (ref 28)
3418
+ Condition => '$$self{PhaseDetectAF} < 2 and $$self{AFInfo2Version} ne "0301"',
3361
3419
  Notes => q{
3362
3420
  models with 51-point AF -- 5 rows (A-E) and 11 columns (1-11): D3, D3S, D3X,
3363
3421
  D4, D4S, D300, D300S, D700, D800, D800e and D810
@@ -3492,7 +3550,7 @@ my %binaryDataAttrs = (
3492
3550
  8 => [
3493
3551
  { #JD/PH
3494
3552
  Name => 'AFPointsUsed',
3495
- Condition => '$$self{PhaseDetectAF} < 2',
3553
+ Condition => '$$self{PhaseDetectAF} < 2 and $$self{AFInfo2Version} ne "0301"',
3496
3554
  Notes => q{
3497
3555
  models with 51-point AF -- 5 rows: A1-9, B1-11, C1-11, D1-11, E1-9. Center
3498
3556
  point is C6
@@ -3611,6 +3669,8 @@ my %binaryDataAttrs = (
3611
3669
  },
3612
3670
  { #PH
3613
3671
  Name => 'AFPointsUsed',
3672
+ # version 301 uses a separate field at offset 0x0a for this tag (ref 28)
3673
+ Condition => '$$self{AFInfo2Version} ne "0301"',
3614
3674
  Format => 'undef[7]',
3615
3675
  ValueConv => 'join(" ", unpack("H2"x7, $val))',
3616
3676
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
@@ -3618,6 +3678,19 @@ my %binaryDataAttrs = (
3618
3678
  PrintConvInv => '$val=~s/Unknown \\((.*)\\)/$1/; $val',
3619
3679
  },
3620
3680
  ],
3681
+ 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
3682
+ Name => 'AFPointsUsed',
3683
+ Condition => '$$self{AFInfo2Version} eq "0301" and $$self{PhaseDetectAF} == 9',
3684
+ Notes => q{
3685
+ models with 105-point AF -- 7 rows (A-G) and 15 columns (1-15). Center
3686
+ point is D8
3687
+ },
3688
+ Format => 'undef[14]',
3689
+ ValueConv => 'join(" ", unpack("H2"x14, $val))',
3690
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
3691
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints105); },
3692
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints105); },
3693
+ },
3621
3694
  0x10 => { #PH (D90 and D5000)
3622
3695
  Name => 'AFImageWidth',
3623
3696
  Condition => '$$self{AFInfo2Version} eq "0100"',
@@ -3660,11 +3733,21 @@ my %binaryDataAttrs = (
3660
3733
  Format => 'int16u',
3661
3734
  RawConv => '$val ? $val : undef',
3662
3735
  },
3663
- 0x1c => { #PH
3664
- Name => 'ContrastDetectAFInFocus',
3665
- Condition => '$$self{AFInfo2Version} eq "0100"',
3666
- PrintConv => { 0 => 'No', 1 => 'Yes' },
3667
- },
3736
+ 0x1c => [
3737
+ { #PH
3738
+ Name => 'ContrastDetectAFInFocus',
3739
+ Condition => '$$self{AFInfo2Version} eq "0100"',
3740
+ PrintConv => { 0 => 'No', 1 => 'Yes' },
3741
+ },{ #PH (D500, see forum11190)
3742
+ Name => 'AFPointsSelected',
3743
+ Condition => '$$self{AFInfo2Version} eq "0101" and $$self{PhaseDetectAF} == 7',
3744
+ Format => 'undef[20]',
3745
+ ValueConv => 'join(" ", unpack("H2"x20, $val))',
3746
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
3747
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints153); },
3748
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153); },
3749
+ },
3750
+ ],
3668
3751
  # 0x1d - always zero (with or without live view)
3669
3752
  0x2a => { #PH (Z7)
3670
3753
  Name => 'AFImageWidth',
@@ -3680,14 +3763,31 @@ my %binaryDataAttrs = (
3680
3763
  },
3681
3764
  0x2e => { #PH (Z7)
3682
3765
  Name => 'AFAreaXPosition',
3683
- Condition => '$$self{ContrastDetectAF} == 2 and $$self{AFInfo2Version} =~ /^03/',
3684
- Format => 'int16u',
3685
- },
3686
- 0x30 => { #PH (Z7)
3687
- Name => 'AFAreaYPosition',
3688
- Condition => '$$self{ContrastDetectAF} == 2 and $$self{AFInfo2Version} =~ /^03/',
3766
+ Condition => q{
3767
+ $$self{ContrastDetectAF} == 2 and $$self{AFInfo2Version} =~ /^03/ or
3768
+ $$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} =~ /^0301/
3769
+ },
3689
3770
  Format => 'int16u',
3690
3771
  },
3772
+ 0x30 => [
3773
+ { #PH (Z7)
3774
+ Name => 'AFAreaYPosition',
3775
+ Condition => q{
3776
+ $$self{ContrastDetectAF} == 2 and $$self{AFInfo2Version} =~ /^03/ or
3777
+ $$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} =~ /^0301/
3778
+ },
3779
+ Format => 'int16u',
3780
+ },{ #PH (D500, see forum11190)
3781
+ Name => 'AFPointsInFocus',
3782
+ Condition => '$$self{AFInfo2Version} eq "0101" and $$self{PhaseDetectAF} == 7',
3783
+ Notes => 'AF points in focus at the time time image was captured',
3784
+ Format => 'undef[20]',
3785
+ ValueConv => 'join(" ", unpack("H2"x20, $val))',
3786
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
3787
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints153); },
3788
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153); },
3789
+ },
3790
+ ],
3691
3791
  0x32 => { #PH (Z7)
3692
3792
  Name => 'AFAreaWidth',
3693
3793
  Condition => '$$self{AFInfo2Version} =~ /^03/',
@@ -3700,6 +3800,19 @@ my %binaryDataAttrs = (
3700
3800
  Format => 'int16u',
3701
3801
  RawConv => '$val ? $val : undef',
3702
3802
  },
3803
+ 0x38 => { #28
3804
+ Name => 'PrimaryAFPoint',
3805
+ Condition => '$$self{PhaseDetectAF} == 9 and $$self{AFInfo2Version} =~ /^03/',
3806
+ Notes => q{
3807
+ Nikon models with 105-point AF -- 7 rows (A-G) and 15 columns (1-15): D6
3808
+ },
3809
+ PrintConvColumns => 5,
3810
+ PrintConv => {
3811
+ 0 => '(none)',
3812
+ %afPoints105,
3813
+ 1 => 'D8 (Center)',
3814
+ },
3815
+ },
3703
3816
  0x44 => [
3704
3817
  {
3705
3818
  Name => 'PrimaryAFPoint',
@@ -3799,6 +3912,7 @@ my %binaryDataAttrs = (
3799
3912
  # (don't know what the difference between 1 and 2 is)
3800
3913
  1 => 'On (1)',
3801
3914
  2 => 'On (2)',
3915
+ 3 => 'On (Zoom)', #28
3802
3916
  },
3803
3917
  },
3804
3918
  1 => {
@@ -3808,6 +3922,7 @@ my %binaryDataAttrs = (
3808
3922
  PrintConvInv => '$val eq "n/a" ? 255 : $val',
3809
3923
  },
3810
3924
  2 => {
3925
+ # when AFFineTune = 3 (indicating a zoom lens), this Tag stores the tuning adjustment for the wide end of the zoom range (ref 28)
3811
3926
  Name => 'AFFineTuneAdj',
3812
3927
  Priority => 0, # so other value takes priority if it exists
3813
3928
  Notes => 'may only be valid for saved lenses',
@@ -3815,6 +3930,14 @@ my %binaryDataAttrs = (
3815
3930
  PrintConv => '$val > 0 ? "+$val" : $val',
3816
3931
  PrintConvInv => '$val',
3817
3932
  },
3933
+ 3 => {
3934
+ Name => 'AFFineTuneAdjTele',
3935
+ # should probably insert a Condition that restricts this to AFFineTune = 3 (ref 28)
3936
+ Notes => 'only valid for zoom lenses (ie, AFTune=3)',
3937
+ Format => 'int8s',
3938
+ PrintConv => '$val > 0 ? "+$val" : $val',
3939
+ PrintConvInv => '$val',
3940
+ },
3818
3941
  );
3819
3942
 
3820
3943
  # Nikon NEF processing information (ref forum6281)
@@ -4535,6 +4658,12 @@ my %nikonFocalConversions = (
4535
4658
  13 => 'Nikkor Z 24-70mm f/2.8 S',
4536
4659
  14 => 'Nikkor Z 85mm f/1.8 S',
4537
4660
  15 => 'Nikkor Z 24mm f/1.8 S', #IB
4661
+ 16 => 'Nikkor Z 70-200mm f/2.8 VR S', #IB
4662
+ 17 => 'Nikkor Z 20mm f/1.8 S', #IB
4663
+ 18 => 'Nikkor Z 24-200mm f/4-6.3 VR', #IB
4664
+ 21 => 'Nikkor Z 50mm f/1.2 S', #IB
4665
+ 22 => 'Nikkor Z 24-50mm f/4-6.3', #IB
4666
+ 23 => 'Nikkor Z 14-24mm f/2.8 S', #IB
4538
4667
  },
4539
4668
  },
4540
4669
  0x36 => {
@@ -6249,7 +6378,7 @@ my %nikonFocalConversions = (
6249
6378
  # 3 => 'Rotate 180',
6250
6379
  # },
6251
6380
  #},
6252
- 0x2ea4 => {
6381
+ 0x2ea4 => { #PH
6253
6382
  Name => 'NikonMeteringMode',
6254
6383
  Condition => '$$self{Model} =~ /\bD500\b/', # (didn't seem to work for D5, but I need more samples)
6255
6384
  Notes => 'D500 only',
@@ -6626,7 +6755,7 @@ my %nikonFocalConversions = (
6626
6755
  WRITE_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
6627
6756
  CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
6628
6757
  VARS => { ID_LABEL => 'Index' },
6629
- DATAMEMBER => [ 0x04, 0x58, 0x0fbf ],
6758
+ DATAMEMBER => [ 0x04, 0x58, 0xa0, 0x0fbf, 0x2efa ],
6630
6759
  IS_SUBDIR => [ 0x1038 ],
6631
6760
  WRITABLE => 1,
6632
6761
  FIRST_ENTRY => 0,
@@ -6652,6 +6781,14 @@ my %nikonFocalConversions = (
6652
6781
  Hidden => 1,
6653
6782
  RawConv => '$$self{CustomSettingsOffset} = $val || 0x10000000; undef',
6654
6783
  },
6784
+ 0xa0 => {
6785
+ Name => 'OrientationOffset',
6786
+ DataMember => 'OrientationOffset',
6787
+ Format => 'int32u',
6788
+ Writable => 0,
6789
+ Hidden => 1,
6790
+ RawConv => '$$self{OrientationOffset} = $val || 0x10000000; undef',
6791
+ },
6655
6792
  0x0791 => {
6656
6793
  Name => 'PhotoShootingMenuBankImageArea',
6657
6794
  Mask => 0x07,
@@ -6691,6 +6828,14 @@ my %nikonFocalConversions = (
6691
6828
  TagTable => 'Image::ExifTool::NikonCustom::SettingsD850',
6692
6829
  },
6693
6830
  },
6831
+ ### 0x2efb - OrientationInfo start (D850 firmware 1.01a)
6832
+ 0x2efa => {
6833
+ Name => 'Hook1',
6834
+ Hidden => 1,
6835
+ RawConv => 'undef',
6836
+ # account for variable location of OrientationInfo data
6837
+ Hook => '$varSize = $$self{OrientationOffset} - 0x2efb',
6838
+ },
6694
6839
  0x2efb => { #28
6695
6840
  Name => 'RollAngle',
6696
6841
  Format => 'fixed32u',