exiftool_vendored 11.94.0 → 12.06.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.

Potentially problematic release.


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

Files changed (62) hide show
  1. checksums.yaml +5 -5
  2. data/bin/Changes +163 -3
  3. data/bin/MANIFEST +5 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +32 -32
  7. data/bin/exiftool +152 -52
  8. data/bin/lib/Image/ExifTool.pm +166 -115
  9. data/bin/lib/Image/ExifTool.pod +108 -81
  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 +13 -7
  13. data/bin/lib/Image/ExifTool/Canon.pm +6 -3
  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 +16 -3
  17. data/bin/lib/Image/ExifTool/Exif.pm +15 -6
  18. data/bin/lib/Image/ExifTool/Font.pm +9 -2
  19. data/bin/lib/Image/ExifTool/GIF.pm +5 -0
  20. data/bin/lib/Image/ExifTool/GeoTiff.pm +2 -0
  21. data/bin/lib/Image/ExifTool/Geotag.pm +69 -21
  22. data/bin/lib/Image/ExifTool/GoPro.pm +10 -1
  23. data/bin/lib/Image/ExifTool/H264.pm +1 -1
  24. data/bin/lib/Image/ExifTool/HtmlDump.pm +2 -2
  25. data/bin/lib/Image/ExifTool/ID3.pm +91 -12
  26. data/bin/lib/Image/ExifTool/Lang/de.pm +3 -1
  27. data/bin/lib/Image/ExifTool/Lang/es.pm +1 -1
  28. data/bin/lib/Image/ExifTool/M2TS.pm +44 -24
  29. data/bin/lib/Image/ExifTool/MWG.pm +9 -1
  30. data/bin/lib/Image/ExifTool/MacOS.pm +1 -1
  31. data/bin/lib/Image/ExifTool/Minolta.pm +3 -2
  32. data/bin/lib/Image/ExifTool/MinoltaRaw.pm +11 -10
  33. data/bin/lib/Image/ExifTool/Nikon.pm +156 -18
  34. data/bin/lib/Image/ExifTool/Olympus.pm +34 -17
  35. data/bin/lib/Image/ExifTool/PNG.pm +14 -3
  36. data/bin/lib/Image/ExifTool/PPM.pm +5 -5
  37. data/bin/lib/Image/ExifTool/Panasonic.pm +147 -13
  38. data/bin/lib/Image/ExifTool/PanasonicRaw.pm +33 -0
  39. data/bin/lib/Image/ExifTool/Parrot.pm +2 -1
  40. data/bin/lib/Image/ExifTool/Pentax.pm +3 -1
  41. data/bin/lib/Image/ExifTool/Photoshop.pm +2 -1
  42. data/bin/lib/Image/ExifTool/QuickTime.pm +277 -33
  43. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +460 -67
  44. data/bin/lib/Image/ExifTool/README +21 -20
  45. data/bin/lib/Image/ExifTool/RIFF.pm +123 -3
  46. data/bin/lib/Image/ExifTool/RTF.pm +12 -7
  47. data/bin/lib/Image/ExifTool/Ricoh.pm +19 -1
  48. data/bin/lib/Image/ExifTool/Shift.pl +1 -0
  49. data/bin/lib/Image/ExifTool/SigmaRaw.pm +40 -33
  50. data/bin/lib/Image/ExifTool/Sony.pm +379 -12
  51. data/bin/lib/Image/ExifTool/TagLookup.pm +1959 -1874
  52. data/bin/lib/Image/ExifTool/TagNames.pod +346 -55
  53. data/bin/lib/Image/ExifTool/Validate.pm +4 -4
  54. data/bin/lib/Image/ExifTool/WriteExif.pl +3 -2
  55. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +26 -15
  56. data/bin/lib/Image/ExifTool/Writer.pl +52 -23
  57. data/bin/lib/Image/ExifTool/XMP.pm +41 -4
  58. data/bin/lib/Image/ExifTool/XMPStruct.pl +3 -1
  59. data/bin/lib/Image/ExifTool/ZISRAW.pm +123 -0
  60. data/bin/perl-Image-ExifTool.spec +31 -31
  61. data/lib/exiftool_vendored/version.rb +1 -1
  62. metadata +4 -4
@@ -11,7 +11,7 @@ package Image::ExifTool::Lang::de;
11
11
  use strict;
12
12
  use vars qw($VERSION);
13
13
 
14
- $VERSION = '1.35';
14
+ $VERSION = '1.36';
15
15
 
16
16
  %Image::ExifTool::Lang::de::Translate = (
17
17
  'AEAperture' => 'AE-Blende',
@@ -993,7 +993,9 @@ $VERSION = '1.35';
993
993
  },
994
994
  },
995
995
  'AdvancedSceneMode' => {
996
+ Description => 'Erweiteter Szenenmodus',
996
997
  PrintConv => {
998
+ 'Off' => 'Aus',
997
999
  'Creative Macro' => 'Makro kreativ',
998
1000
  'Flower' => 'Blumen',
999
1001
  'HDR B&W' => 'HDR Schwarz-Weiß',
@@ -1302,7 +1302,7 @@ $VERSION = '1.16';
1302
1302
  'ExifImageHeight' => 'Alto Imagen',
1303
1303
  'ExifImageWidth' => 'Ancho Imagen',
1304
1304
  'ExifOffset' => 'Puntero Exif IFD',
1305
- 'ExifToolVersion' => 'Versión Exiftool',
1305
+ 'ExifToolVersion' => 'Versión ExifTool',
1306
1306
  'ExifVersion' => 'Versión Exif',
1307
1307
  'ExpandFilm' => 'Película Expandida',
1308
1308
  'ExpandFilterLens' => 'Filtro Objetivo Expandida',
@@ -31,7 +31,7 @@ use strict;
31
31
  use vars qw($VERSION);
32
32
  use Image::ExifTool qw(:DataAccess :Utils);
33
33
 
34
- $VERSION = '1.16';
34
+ $VERSION = '1.18';
35
35
 
36
36
  # program map table "stream_type" lookup (ref 6/1)
37
37
  my %streamType = (
@@ -262,7 +262,7 @@ sub ParseAC3Descriptor($$)
262
262
 
263
263
  #------------------------------------------------------------------------------
264
264
  # Parse PID stream data
265
- # Inputs: 0) Exiftool ref, 1) PID number, 2) PID type, 3) PID name, 4) data ref
265
+ # Inputs: 0) ExifTool ref, 1) PID number, 2) PID type, 3) PID name, 4) data ref
266
266
  # Returns: 0=stream parsed OK,
267
267
  # 1=stream parsed but we want to parse more of these,
268
268
  # -1=can't parse yet because we don't know the type
@@ -313,7 +313,7 @@ sub ProcessM2TS($$)
313
313
  my $raf = $$dirInfo{RAF};
314
314
  my ($buff, $pLen, $upkPrefix, $j, $fileType, $eof);
315
315
  my (%pmt, %pidType, %data, %sectLen);
316
- my ($startTime, $endTime, $backScan, $maxBack);
316
+ my ($startTime, $endTime, $fwdTime, $backScan, $maxBack);
317
317
  my $verbose = $et->Options('Verbose');
318
318
  my $out = $et->Options('TextOut');
319
319
 
@@ -330,7 +330,7 @@ sub ProcessM2TS($$)
330
330
  $upkPrefix = 'x4N';
331
331
  }
332
332
  my $prePos = $pLen - 188; # byte position of packet prefix
333
- my $readSize = 64 * $pLen; # read 64 packets at once
333
+ my $readSize = 64 * $pLen; # size of our read buffer
334
334
  $raf->Seek(0,0); # rewind to start
335
335
  $raf->Read($buff, $readSize) >= $pLen * 4 or return 0; # require at least 4 packets
336
336
  # validate the sync byte in the next 3 packets
@@ -351,39 +351,58 @@ sub ProcessM2TS($$)
351
351
  my %didPID = ( 1 => 0, 2 => 0, 0x1fff => 0 );
352
352
  my %needPID = ( 0 => 1 ); # lookup for stream PID's that we still need to parse
353
353
  my $pEnd = 0;
354
- my $i = 0;
355
354
 
356
355
  # parse packets from MPEG-2 Transport Stream
357
356
  for (;;) {
358
357
 
359
358
  unless (%needPID) {
360
359
  last unless defined $startTime;
361
- # seek backwards to find last PCR
362
- if (defined $backScan) {
363
- last if defined $endTime;
364
- $backScan -= $pLen;
365
- last if $backScan < $maxBack;
366
- } else {
360
+ # reconfigure to seek backwards for last PCR
361
+ unless (defined $backScan) {
362
+ my $saveTime = $endTime;
367
363
  undef $endTime;
368
364
  last if $et->Options('FastScan');
369
- $verbose and print "[Starting backscan for last PCR]\n";
370
- # calculate position of last complete packet
371
- my $fwdPos = $raf->Tell();
365
+ $verbose and print $out "[Starting backscan for last PCR]\n";
366
+ # remember how far we got when reading forward through the file
367
+ my $fwdPos = $raf->Tell() - length($buff) + $pEnd;
368
+ # determine the position of the last packet relative to the EOF
372
369
  $raf->Seek(0, 2) or last;
373
370
  my $fsize = $raf->Tell();
374
- my $nPack = int($fsize / $pLen);
375
- $backScan = ($nPack - 1) * $pLen - $fsize;
371
+ $backScan = int($fsize / $pLen) * $pLen - $fsize;
376
372
  # set limit on how far back we will go
377
373
  $maxBack = $fwdPos - $fsize;
378
- $maxBack = -256000 if $maxBack < -256000;
374
+ # scan back a maximum of 512k (have seen last PCR at -276k)
375
+ my $nMax = int(512000 / $pLen); # max packets to backscan
376
+ if ($nMax < int(-$maxBack / $pLen)) {
377
+ $maxBack = $backScan - $nMax * $pLen;
378
+ } else {
379
+ # use this time if none found in all remaining packets
380
+ $fwdTime = $saveTime;
381
+ }
382
+ $pEnd = 0;
379
383
  }
380
- $raf->Seek($backScan, 2) or last;
381
384
  }
382
- my $pos = $pEnd;
385
+ my $pos;
383
386
  # read more if necessary
384
- if ($pos + $pLen > length $buff) {
385
- $raf->Read($buff, $readSize) >= $pLen or $eof = 1, last;
386
- $pos = $pEnd = 0;
387
+ if (defined $backScan) {
388
+ last if defined $endTime;
389
+ $pos = $pEnd = $pEnd - 2 * $pLen; # step back to previous packet
390
+ if ($pos < 0) {
391
+ # read another buffer from end of file
392
+ last if $backScan <= $maxBack;
393
+ my $buffLen = $backScan - $maxBack;
394
+ $buffLen = $readSize if $buffLen > $readSize;
395
+ $backScan -= $buffLen;
396
+ $raf->Seek($backScan, 2) or last;
397
+ $raf->Read($buff, $buffLen) == $buffLen or last;
398
+ $pos = $pEnd = $buffLen - $pLen;
399
+ }
400
+ } else {
401
+ $pos = $pEnd;
402
+ if ($pos + $pLen > length $buff) {
403
+ $raf->Read($buff, $readSize) >= $pLen or $eof = 1, last;
404
+ $pos = $pEnd = 0;
405
+ }
387
406
  }
388
407
  $pEnd += $pLen;
389
408
  # decode the packet prefix
@@ -404,8 +423,8 @@ sub ProcessM2TS($$)
404
423
  # my $continuity_counter = $prefix & 0x0000000f;
405
424
 
406
425
  if ($verbose > 1) {
426
+ my $i = ($raf->Tell() - length($buff) + $pEnd) / $pLen - 1;
407
427
  print $out "Transport packet $i:\n";
408
- ++$i;
409
428
  $et->VerboseDump(\$buff, Len => $pLen, Addr => $i * $pLen, Start => $pos - $prePos);
410
429
  my $str = $pidName{$pid} ? " ($pidName{$pid})" : '';
411
430
  printf $out " Timecode: 0x%.4x\n", Get32u(\$buff, $pos - $prePos) if $pLen == 192;
@@ -646,7 +665,8 @@ sub ProcessM2TS($$)
646
665
  }
647
666
 
648
667
  # calculate Duration if available
649
- if (defined $startTime and defined $endTime and $startTime != $endTime) {
668
+ $endTime = $fwdTime unless defined $endTime;
669
+ if (defined $startTime and defined $endTime) {
650
670
  $endTime += 0x80000000 * 1200 if $startTime > $endTime; # handle 33-bit wrap
651
671
  $et->HandleTag($tagTablePtr, 'Duration', $endTime - $startTime);
652
672
  }
@@ -16,7 +16,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
16
16
  use Image::ExifTool::Exif;
17
17
  use Image::ExifTool::XMP;
18
18
 
19
- $VERSION = '1.23';
19
+ $VERSION = '1.24';
20
20
 
21
21
  sub RecoverTruncatedIPTC($$$);
22
22
  sub ListToString($);
@@ -629,6 +629,14 @@ sub OverwriteStringList($$$$)
629
629
  local $_;
630
630
  my ($et, $nvHash, $val, $newValuePt) = @_;
631
631
  my (@new, $delIndex);
632
+ my $writeMode = $et->Options('WriteMode');
633
+ if ($writeMode ne 'wcg') {
634
+ if (defined $val) {
635
+ $writeMode =~ /w/i or return 0;
636
+ } else {
637
+ $writeMode =~ /c/i or return 0;
638
+ }
639
+ }
632
640
  if ($$nvHash{DelValue} and defined $val) {
633
641
  # preserve specified old values
634
642
  my $old = StringToList($val, $et);
@@ -325,7 +325,7 @@ sub MDItemLocalTime($)
325
325
 
326
326
  #------------------------------------------------------------------------------
327
327
  # Set MacOS MDItem and XAttr tags from new tag values
328
- # Inputs: 0) Exiftool ref, 1) file name, 2) list of tags to set
328
+ # Inputs: 0) ExifTool ref, 1) file name, 2) list of tags to set
329
329
  # Returns: 1=something was set OK, 0=didn't try, -1=error (and warning set)
330
330
  # Notes: There may be errors even if 1 is returned
331
331
  sub SetMacOSTags($$$)
@@ -49,7 +49,7 @@ use vars qw($VERSION %minoltaLensTypes %minoltaTeleconverters %minoltaColorMode
49
49
  use Image::ExifTool qw(:DataAccess :Utils);
50
50
  use Image::ExifTool::Exif;
51
51
 
52
- $VERSION = '2.83';
52
+ $VERSION = '2.84';
53
53
 
54
54
  # Full list of product codes for Sony-compatible Minolta lenses
55
55
  # (ref http://www.kb.sony.com/selfservice/documentLink.do?externalId=C1000570)
@@ -608,7 +608,8 @@ $VERSION = '2.83';
608
608
  103 => 'Light', #JD
609
609
  104 => 'Night View', #JD
610
610
  105 => 'Autumn Leaves', #JD
611
- 0xffffffff => 'n/a', #PH
611
+ 255 => 'Off', #JR (new for ILCE-7SM3, July 2020)
612
+ 0xffffffff => 'n/a', #PH
612
613
  );
613
614
 
614
615
  %minoltaSceneMode = (
@@ -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.86';
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)
@@ -448,6 +449,7 @@ sub GetAFPointGrid($$;$);
448
449
  # '92 3E 2D 88 2C 40 4B 0E' (22mm)
449
450
  # '92 40 2D 88 2C 40 4B 0E' (18mm)
450
451
  '26 48 31 49 24 24 1C 02' => 'Sigma 20-40mm F2.8',
452
+ '7B 48 37 44 18 18 4B 06' => 'Sigma 24-35mm F2.0 DG HSM | A', #30
451
453
  '02 3A 37 50 31 3D 02 00' => 'Sigma 24-50mm F4-5.6 UC',
452
454
  '26 48 37 56 24 24 1C 02' => 'Sigma 24-60mm F2.8 EX DG',
453
455
  'B6 48 37 56 24 24 1C 02' => 'Sigma 24-60mm F2.8 EX DG',
@@ -512,6 +514,7 @@ sub GetAFPointGrid($$;$);
512
514
  'CE 34 76 A0 38 40 4B 0E' => 'Sigma 150-500mm F5-6.3 DG OS APO HSM', #JD
513
515
  '81 34 76 A6 38 40 4B 0E' => 'Sigma 150-600mm F5-6.3 DG OS HSM | S', #Jaap Voets
514
516
  '82 34 76 A6 38 40 4B 0E' => 'Sigma 150-600mm F5-6.3 DG OS HSM | C',
517
+ 'C4 4C 73 73 14 14 4B 46' => 'Sigma 135mm F1.8 DG HSM | A', #forum3833
515
518
  '26 40 7B A0 34 40 1C 02' => 'Sigma APO 170-500mm F5-6.3 Aspherical RF',
516
519
  'A7 49 80 A0 24 24 4B 06' => 'Sigma APO 200-500mm F2.8 EX DG',
517
520
  '48 3C 8E B0 3C 3C 4B 02' => 'Sigma APO 300-800mm F5.6 EX DG HSM',
@@ -578,6 +581,7 @@ sub GetAFPointGrid($$;$);
578
581
  '4D 41 3C 8E 2B 40 62 02' => 'Tamron AF 28-300mm f/3.5-6.3 XR Di LD Aspherical (IF) (A061)',
579
582
  '4D 41 3C 8E 2C 40 62 02' => 'Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical (IF) (185D)',
580
583
  '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)',
584
+ 'C9 3C 44 76 25 31 DF 4E' => 'Tamron 35-150mm f/2.8-4 Di VC OSD (A043)', #30
581
585
  '00 47 53 80 30 3C 00 06' => 'Tamron AF 55-200mm f/4-5.6 Di II LD (A15)',
582
586
  'F7 53 5C 80 24 24 84 06' => 'Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)',
583
587
  'FE 53 5C 80 24 24 84 06' => 'Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)',
@@ -652,6 +656,7 @@ sub GetAFPointGrid($$;$);
652
656
  '00 40 64 64 2C 2C 00 00' => 'Voigtlander APO-Lanthar 90mm F3.5 SLII Close Focus',
653
657
  #
654
658
  '00 40 2D 2D 2C 2C 00 00' => 'Carl Zeiss Distagon T* 3.5/18 ZF.2',
659
+ '00 48 27 27 24 24 00 00' => 'Carl Zeiss Distagon T* 2.8/15 ZF.2', #MykytaKozlov
655
660
  '00 48 32 32 24 24 00 00' => 'Carl Zeiss Distagon T* 2.8/21 ZF.2',
656
661
  '00 54 38 38 18 18 00 00' => 'Carl Zeiss Distagon T* 2/25 ZF.2',
657
662
  '00 54 3C 3C 18 18 00 00' => 'Carl Zeiss Distagon T* 2/28 ZF.2',
@@ -709,6 +714,7 @@ sub GetAFPointGrid($$;$);
709
714
  '00 48 80 80 30 30 00 00' => 'Nikkor 200mm f/4 AiS',
710
715
  '00 40 11 11 2C 2C 00 00' => 'Samyang 8mm f/3.5 Fish-Eye',
711
716
  '00 58 64 64 20 20 00 00' => 'Soligor C/D Macro MC 90mm f/2.5',
717
+ '4A 58 30 30 14 0C 4D 02' => 'Rokinon 20mm f/1.8 ED AS UMC', #30
712
718
  );
713
719
 
714
720
  # text encoding used in LocationInfo (ref PH)
@@ -876,6 +882,38 @@ my %afPoints39 = (
876
882
  10 => 'E3', 20 => 'B9', 30 => 'D4',
877
883
  );
878
884
 
885
+ # AF point indices for models with 105 focus points, eg. D6 (ref 28)
886
+ # - 7 rows (A-G) with 15 columns (1-15), center is D8
887
+ my %afPoints105 = (
888
+ 1 => 'D8', 28 => 'G7', 55 => 'F13', 82 => 'E4',
889
+ 2 => 'C8', 29 => 'D6', 56 => 'G13', 83 => 'F4',
890
+ 3 => 'B8', 30 => 'C6', 57 => 'D14', 84 => 'G4',
891
+ 4 => 'A8', 31 => 'B6', 58 => 'C14', 85 => 'D3',
892
+ 5 => 'E8', 32 => 'A6', 59 => 'B14', 86 => 'C3',
893
+ 6 => 'F8', 33 => 'E6', 60 => 'A14', 87 => 'B3',
894
+ 7 => 'G8', 34 => 'F6', 61 => 'E14', 88 => 'A3',
895
+ 8 => 'D9', 35 => 'G6', 62 => 'F14', 89 => 'E3',
896
+ 9 => 'C9', 36 => 'D11', 63 => 'G14', 90 => 'F3',
897
+ 10 => 'B9', 37 => 'C11', 64 => 'D15', 91 => 'G3',
898
+ 11 => 'A9', 38 => 'B11', 65 => 'C15', 92 => 'D2',
899
+ 12 => 'E9', 39 => 'A11', 66 => 'B15', 93 => 'C2',
900
+ 13 => 'F9', 40 => 'E11', 67 => 'A15', 94 => 'B2',
901
+ 14 => 'G9', 41 => 'F11', 68 => 'E15', 95 => 'A2',
902
+ 15 => 'D10', 42 => 'G11', 69 => 'F15', 96 => 'E2',
903
+ 16 => 'C10', 43 => 'D12', 70 => 'G15', 97 => 'F2',
904
+ 17 => 'B10', 44 => 'C12', 71 => 'D5', 98 => 'G2',
905
+ 18 => 'A10', 45 => 'B12', 72 => 'C5', 99 => 'D1',
906
+ 19 => 'E10', 46 => 'A12', 73 => 'B5', 100 => 'C1',
907
+ 20 => 'F10', 47 => 'E12', 74 => 'A5', 101 => 'B1',
908
+ 21 => 'G10', 48 => 'F12', 75 => 'E5', 102 => 'A1',
909
+ 22 => 'D7', 49 => 'G12', 76 => 'F5', 103 => 'E1',
910
+ 23 => 'C7', 50 => 'D13', 77 => 'G5', 104 => 'F1',
911
+ 24 => 'B7', 51 => 'C13', 78 => 'D4', 105 => 'G1',
912
+ 25 => 'A7', 52 => 'B13', 79 => 'C4',
913
+ 26 => 'E7', 53 => 'A13', 80 => 'B4',
914
+ 27 => 'F7', 54 => 'E13', 81 => 'A4',
915
+ );
916
+
879
917
  # AF point indices for models with 135 focus points, eg. 1J1 (ref PH)
880
918
  # - 9 rows (A-I) with 15 columns (1-15), center is E8
881
919
  # - odd columns, columns 2 and 14, and the remaining corner points are
@@ -1538,7 +1576,7 @@ my %binaryDataAttrs = (
1538
1576
  0x008c => {
1539
1577
  Name => 'ContrastCurve', #JD
1540
1578
  Writable => 'undef',
1541
- Flags => [ 'Binary', 'Protected' ],
1579
+ Flags => [ 'Binary', 'Protected', 'Drop' ], # (drop because not found in Nikon JPEG's)
1542
1580
  },
1543
1581
  # ColorHue: MODE1/MODE1a=sRGB, MODE2=Adobe RGB, MODE3a=more saturated sRGB
1544
1582
  # --> should really be called ColorSpace or ColorMode, but that would conflict with other tags
@@ -1693,7 +1731,8 @@ my %binaryDataAttrs = (
1693
1731
  SubDirectory => {
1694
1732
  TagTable => 'Image::ExifTool::Nikon::ShotInfoD850',
1695
1733
  DecryptStart => 4,
1696
- DecryptLen => 0x2f07,
1734
+ DecryptLen => 0x2efb + 12,
1735
+ DecryptMore => 'Get32u(\$data, 0xa0) + 12',
1697
1736
  ByteOrder => 'LittleEndian',
1698
1737
  },
1699
1738
  },
@@ -1782,6 +1821,16 @@ my %binaryDataAttrs = (
1782
1821
  ByteOrder => 'LittleEndian',
1783
1822
  },
1784
1823
  },
1824
+ { # (D6 firmware version 1.00, ref 28)
1825
+ Condition => '$$valPt =~ /^0246/',
1826
+ Name => 'ShotInfoD6',
1827
+ SubDirectory => {
1828
+ TagTable => 'Image::ExifTool::Nikon::ShotInfo',
1829
+ DecryptStart => 4,
1830
+ DecryptLen => 0xa4, # only decrypt the version info & offset fields for now
1831
+ ByteOrder => 'LittleEndian',
1832
+ },
1833
+ },
1785
1834
  { # (D610 firmware version 1.00)
1786
1835
  Condition => '$$valPt =~ /^0232/',
1787
1836
  Name => 'ShotInfoD610',
@@ -1831,6 +1880,7 @@ my %binaryDataAttrs = (
1831
1880
  7 => 'Unpacked 12 bits', #IB (padded to 16)
1832
1881
  8 => 'Small', #IB
1833
1882
  9 => 'Packed 12 bits', #IB (2 pixels in 3 bytes)
1883
+ 10 => 'Packed 14 bits', #28 (4 pixels in 7 bytes, eg. D6 uncompressed 14 bit)
1834
1884
  },
1835
1885
  },
1836
1886
  0x0094 => { Name => 'SaturationAdj', Writable => 'int16s' },
@@ -3297,6 +3347,7 @@ my %binaryDataAttrs = (
3297
3347
  15 => 'Dynamic Area (72 points)', #PH
3298
3348
  16 => 'Group Area (HL)', #28
3299
3349
  17 => 'Group Area (VL)', #28
3350
+ 18 => 'Dynamic Area (49 points)', #28
3300
3351
  128 => 'Single', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V2,1V3)
3301
3352
  129 => 'Auto (41 points)', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V1,1V2,1V3,AW1)
3302
3353
  130 => 'Subject Tracking (41 points)', #PH (1J1,1J4,1J3)
@@ -3334,6 +3385,10 @@ my %binaryDataAttrs = (
3334
3385
  197 => 'Auto', #PH (Z7)
3335
3386
  198 => 'Auto (198)', #PH (Z7) (focus lock with AF-C maybe?)
3336
3387
  199 => 'Auto (focus lock)', #PH (Z7, AF-S)
3388
+ 200 => 'Normal-area AF', #28 (D6)
3389
+ 201 => 'Wide-area AF', #28 (D6)
3390
+ 202 => 'Face-priority AF', #28 (D6)
3391
+ 203 => 'Subject-tracking AF', #28 (D6)
3337
3392
  },
3338
3393
  },
3339
3394
  ],
@@ -3352,12 +3407,14 @@ my %binaryDataAttrs = (
3352
3407
  6 => 'On (105-point)', #PH (1J4/1V3[128/130])
3353
3408
  7 => 'On (153-point)', #PH (D5/D500/D850)
3354
3409
  8 => 'On (81-point)', #38
3410
+ 9 => 'On (105-point)', #28 (D6)
3355
3411
  },
3356
3412
  },
3357
3413
  7 => [
3358
3414
  { #PH/JD
3359
3415
  Name => 'PrimaryAFPoint',
3360
- Condition => '$$self{PhaseDetectAF} < 2',
3416
+ # PrimaryAFPoint may only be valid for PhaseDetect - certainly true on the D6, possibly other bodies? (ref 28)
3417
+ Condition => '$$self{PhaseDetectAF} < 2 and $$self{AFInfo2Version} ne "0301"',
3361
3418
  Notes => q{
3362
3419
  models with 51-point AF -- 5 rows (A-E) and 11 columns (1-11): D3, D3S, D3X,
3363
3420
  D4, D4S, D300, D300S, D700, D800, D800e and D810
@@ -3492,7 +3549,7 @@ my %binaryDataAttrs = (
3492
3549
  8 => [
3493
3550
  { #JD/PH
3494
3551
  Name => 'AFPointsUsed',
3495
- Condition => '$$self{PhaseDetectAF} < 2',
3552
+ Condition => '$$self{PhaseDetectAF} < 2 and $$self{AFInfo2Version} ne "0301"',
3496
3553
  Notes => q{
3497
3554
  models with 51-point AF -- 5 rows: A1-9, B1-11, C1-11, D1-11, E1-9. Center
3498
3555
  point is C6
@@ -3611,6 +3668,8 @@ my %binaryDataAttrs = (
3611
3668
  },
3612
3669
  { #PH
3613
3670
  Name => 'AFPointsUsed',
3671
+ # version 301 uses a separate field at offset 0x0a for this tag (ref 28)
3672
+ Condition => '$$self{AFInfo2Version} ne "0301"',
3614
3673
  Format => 'undef[7]',
3615
3674
  ValueConv => 'join(" ", unpack("H2"x7, $val))',
3616
3675
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
@@ -3618,6 +3677,19 @@ my %binaryDataAttrs = (
3618
3677
  PrintConvInv => '$val=~s/Unknown \\((.*)\\)/$1/; $val',
3619
3678
  },
3620
3679
  ],
3680
+ 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
3681
+ Name => 'AFPointsUsed',
3682
+ Condition => '$$self{AFInfo2Version} eq "0301" and $$self{PhaseDetectAF} == 9',
3683
+ Notes => q{
3684
+ models with 105-point AF -- 7 rows (A-G) and 15 columns (1-15). Center
3685
+ point is D8
3686
+ },
3687
+ Format => 'undef[14]',
3688
+ ValueConv => 'join(" ", unpack("H2"x14, $val))',
3689
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
3690
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints105); },
3691
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints105); },
3692
+ },
3621
3693
  0x10 => { #PH (D90 and D5000)
3622
3694
  Name => 'AFImageWidth',
3623
3695
  Condition => '$$self{AFInfo2Version} eq "0100"',
@@ -3660,11 +3732,21 @@ my %binaryDataAttrs = (
3660
3732
  Format => 'int16u',
3661
3733
  RawConv => '$val ? $val : undef',
3662
3734
  },
3663
- 0x1c => { #PH
3664
- Name => 'ContrastDetectAFInFocus',
3665
- Condition => '$$self{AFInfo2Version} eq "0100"',
3666
- PrintConv => { 0 => 'No', 1 => 'Yes' },
3667
- },
3735
+ 0x1c => [
3736
+ { #PH
3737
+ Name => 'ContrastDetectAFInFocus',
3738
+ Condition => '$$self{AFInfo2Version} eq "0100"',
3739
+ PrintConv => { 0 => 'No', 1 => 'Yes' },
3740
+ },{ #PH (D500, see forum11190)
3741
+ Name => 'AFPointsSelected',
3742
+ Condition => '$$self{AFInfo2Version} eq "0101" and $$self{PhaseDetectAF} == 7',
3743
+ Format => 'undef[20]',
3744
+ ValueConv => 'join(" ", unpack("H2"x20, $val))',
3745
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
3746
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints153); },
3747
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153); },
3748
+ },
3749
+ ],
3668
3750
  # 0x1d - always zero (with or without live view)
3669
3751
  0x2a => { #PH (Z7)
3670
3752
  Name => 'AFImageWidth',
@@ -3680,14 +3762,31 @@ my %binaryDataAttrs = (
3680
3762
  },
3681
3763
  0x2e => { #PH (Z7)
3682
3764
  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/',
3765
+ Condition => q{
3766
+ $$self{ContrastDetectAF} == 2 and $$self{AFInfo2Version} =~ /^03/ or
3767
+ $$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} =~ /^0301/
3768
+ },
3689
3769
  Format => 'int16u',
3690
3770
  },
3771
+ 0x30 => [
3772
+ { #PH (Z7)
3773
+ Name => 'AFAreaYPosition',
3774
+ Condition => q{
3775
+ $$self{ContrastDetectAF} == 2 and $$self{AFInfo2Version} =~ /^03/ or
3776
+ $$self{ContrastDetectAF} == 1 and $$self{AFInfo2Version} =~ /^0301/
3777
+ },
3778
+ Format => 'int16u',
3779
+ },{ #PH (D500, see forum11190)
3780
+ Name => 'AFPointsInFocus',
3781
+ Condition => '$$self{AFInfo2Version} eq "0101" and $$self{PhaseDetectAF} == 7',
3782
+ Notes => 'AF points in focus at the time time image was captured',
3783
+ Format => 'undef[20]',
3784
+ ValueConv => 'join(" ", unpack("H2"x20, $val))',
3785
+ ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
3786
+ PrintConv => sub { PrintAFPoints(shift, \%afPoints153); },
3787
+ PrintConvInv => sub { PrintAFPointsInv(shift, \%afPoints153); },
3788
+ },
3789
+ ],
3691
3790
  0x32 => { #PH (Z7)
3692
3791
  Name => 'AFAreaWidth',
3693
3792
  Condition => '$$self{AFInfo2Version} =~ /^03/',
@@ -3700,6 +3799,19 @@ my %binaryDataAttrs = (
3700
3799
  Format => 'int16u',
3701
3800
  RawConv => '$val ? $val : undef',
3702
3801
  },
3802
+ 0x38 => { #28
3803
+ Name => 'PrimaryAFPoint',
3804
+ Condition => '$$self{PhaseDetectAF} == 9 and $$self{AFInfo2Version} =~ /^03/',
3805
+ Notes => q{
3806
+ Nikon models with 105-point AF -- 7 rows (A-G) and 15 columns (1-15): D6
3807
+ },
3808
+ PrintConvColumns => 5,
3809
+ PrintConv => {
3810
+ 0 => '(none)',
3811
+ %afPoints105,
3812
+ 1 => 'D8 (Center)',
3813
+ },
3814
+ },
3703
3815
  0x44 => [
3704
3816
  {
3705
3817
  Name => 'PrimaryAFPoint',
@@ -3799,6 +3911,7 @@ my %binaryDataAttrs = (
3799
3911
  # (don't know what the difference between 1 and 2 is)
3800
3912
  1 => 'On (1)',
3801
3913
  2 => 'On (2)',
3914
+ 3 => 'On (Zoom)', #28
3802
3915
  },
3803
3916
  },
3804
3917
  1 => {
@@ -3808,6 +3921,7 @@ my %binaryDataAttrs = (
3808
3921
  PrintConvInv => '$val eq "n/a" ? 255 : $val',
3809
3922
  },
3810
3923
  2 => {
3924
+ # when AFFineTune = 3 (indicating a zoom lens), this Tag stores the tuning adjustment for the wide end of the zoom range (ref 28)
3811
3925
  Name => 'AFFineTuneAdj',
3812
3926
  Priority => 0, # so other value takes priority if it exists
3813
3927
  Notes => 'may only be valid for saved lenses',
@@ -3815,6 +3929,14 @@ my %binaryDataAttrs = (
3815
3929
  PrintConv => '$val > 0 ? "+$val" : $val',
3816
3930
  PrintConvInv => '$val',
3817
3931
  },
3932
+ 3 => {
3933
+ Name => 'AFFineTuneAdjTele',
3934
+ # should probably insert a Condition that restricts this to AFFineTune = 3 (ref 28)
3935
+ Notes => 'only valid for zoom lenses (ie, AFTune=3)',
3936
+ Format => 'int8s',
3937
+ PrintConv => '$val > 0 ? "+$val" : $val',
3938
+ PrintConvInv => '$val',
3939
+ },
3818
3940
  );
3819
3941
 
3820
3942
  # Nikon NEF processing information (ref forum6281)
@@ -6249,7 +6371,7 @@ my %nikonFocalConversions = (
6249
6371
  # 3 => 'Rotate 180',
6250
6372
  # },
6251
6373
  #},
6252
- 0x2ea4 => {
6374
+ 0x2ea4 => { #PH
6253
6375
  Name => 'NikonMeteringMode',
6254
6376
  Condition => '$$self{Model} =~ /\bD500\b/', # (didn't seem to work for D5, but I need more samples)
6255
6377
  Notes => 'D500 only',
@@ -6626,7 +6748,7 @@ my %nikonFocalConversions = (
6626
6748
  WRITE_PROC => \&Image::ExifTool::Nikon::ProcessNikonEncrypted,
6627
6749
  CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
6628
6750
  VARS => { ID_LABEL => 'Index' },
6629
- DATAMEMBER => [ 0x04, 0x58, 0x0fbf ],
6751
+ DATAMEMBER => [ 0x04, 0x58, 0xa0, 0x0fbf, 0x2efa ],
6630
6752
  IS_SUBDIR => [ 0x1038 ],
6631
6753
  WRITABLE => 1,
6632
6754
  FIRST_ENTRY => 0,
@@ -6652,6 +6774,14 @@ my %nikonFocalConversions = (
6652
6774
  Hidden => 1,
6653
6775
  RawConv => '$$self{CustomSettingsOffset} = $val || 0x10000000; undef',
6654
6776
  },
6777
+ 0xa0 => {
6778
+ Name => 'OrientationOffset',
6779
+ DataMember => 'OrientationOffset',
6780
+ Format => 'int32u',
6781
+ Writable => 0,
6782
+ Hidden => 1,
6783
+ RawConv => '$$self{OrientationOffset} = $val || 0x10000000; undef',
6784
+ },
6655
6785
  0x0791 => {
6656
6786
  Name => 'PhotoShootingMenuBankImageArea',
6657
6787
  Mask => 0x07,
@@ -6691,6 +6821,14 @@ my %nikonFocalConversions = (
6691
6821
  TagTable => 'Image::ExifTool::NikonCustom::SettingsD850',
6692
6822
  },
6693
6823
  },
6824
+ ### 0x2efb - OrientationInfo start (D850 firmware 1.01a)
6825
+ 0x2efa => {
6826
+ Name => 'Hook1',
6827
+ Hidden => 1,
6828
+ RawConv => 'undef',
6829
+ # account for variable location of OrientationInfo data
6830
+ Hook => '$varSize = $$self{OrientationOffset} - 0x2efb',
6831
+ },
6694
6832
  0x2efb => { #28
6695
6833
  Name => 'RollAngle',
6696
6834
  Format => 'fixed32u',