exiftool_vendored 11.99.0 → 12.06.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 (56) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +119 -2
  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 +55 -50
  8. data/bin/lib/Image/ExifTool.pm +155 -109
  9. data/bin/lib/Image/ExifTool.pod +103 -77
  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 +11 -6
  13. data/bin/lib/Image/ExifTool/Canon.pm +2 -1
  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/GoPro.pm +10 -1
  22. data/bin/lib/Image/ExifTool/H264.pm +1 -1
  23. data/bin/lib/Image/ExifTool/ID3.pm +86 -12
  24. data/bin/lib/Image/ExifTool/Lang/de.pm +3 -1
  25. data/bin/lib/Image/ExifTool/Lang/es.pm +1 -1
  26. data/bin/lib/Image/ExifTool/M2TS.pm +1 -1
  27. data/bin/lib/Image/ExifTool/MacOS.pm +1 -1
  28. data/bin/lib/Image/ExifTool/Minolta.pm +3 -2
  29. data/bin/lib/Image/ExifTool/Nikon.pm +134 -15
  30. data/bin/lib/Image/ExifTool/Olympus.pm +34 -17
  31. data/bin/lib/Image/ExifTool/PNG.pm +14 -3
  32. data/bin/lib/Image/ExifTool/PPM.pm +5 -5
  33. data/bin/lib/Image/ExifTool/Panasonic.pm +147 -13
  34. data/bin/lib/Image/ExifTool/PanasonicRaw.pm +33 -0
  35. data/bin/lib/Image/ExifTool/Parrot.pm +2 -1
  36. data/bin/lib/Image/ExifTool/Pentax.pm +2 -1
  37. data/bin/lib/Image/ExifTool/Photoshop.pm +2 -1
  38. data/bin/lib/Image/ExifTool/QuickTime.pm +204 -27
  39. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +355 -19
  40. data/bin/lib/Image/ExifTool/README +20 -19
  41. data/bin/lib/Image/ExifTool/Ricoh.pm +19 -1
  42. data/bin/lib/Image/ExifTool/Shift.pl +1 -0
  43. data/bin/lib/Image/ExifTool/SigmaRaw.pm +40 -33
  44. data/bin/lib/Image/ExifTool/Sony.pm +376 -11
  45. data/bin/lib/Image/ExifTool/TagLookup.pm +1949 -1872
  46. data/bin/lib/Image/ExifTool/TagNames.pod +329 -53
  47. data/bin/lib/Image/ExifTool/Validate.pm +4 -4
  48. data/bin/lib/Image/ExifTool/WriteExif.pl +1 -0
  49. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +23 -15
  50. data/bin/lib/Image/ExifTool/Writer.pl +44 -21
  51. data/bin/lib/Image/ExifTool/XMP.pm +41 -4
  52. data/bin/lib/Image/ExifTool/XMPStruct.pl +3 -1
  53. data/bin/lib/Image/ExifTool/ZISRAW.pm +123 -0
  54. data/bin/perl-Image-ExifTool.spec +31 -31
  55. data/lib/exiftool_vendored/version.rb +1 -1
  56. metadata +4 -3
@@ -19,7 +19,7 @@ use strict;
19
19
  use vars qw($VERSION %ttLang);
20
20
  use Image::ExifTool qw(:DataAccess :Utils);
21
21
 
22
- $VERSION = '1.09';
22
+ $VERSION = '1.10';
23
23
 
24
24
  sub ProcessOTF($$);
25
25
 
@@ -589,6 +589,11 @@ sub ProcessFont($$)
589
589
  $et->HandleTag($tagTablePtr, 'postfont', $2);
590
590
  }
591
591
  $rtnVal = 1;
592
+ } elsif ($buff =~ /^(wOF[F2])/) {
593
+ my $type = $1 eq 'wOFF' ? 'woff' : 'woff2';
594
+ $et->SetFileType(uc($type), "font/$type");
595
+ # (don't yet extract metadata from these files)
596
+ $rtnVal = 1;
592
597
  } else {
593
598
  $rtnVal = 0;
594
599
  }
@@ -611,7 +616,9 @@ This module is used by Image::ExifTool
611
616
 
612
617
  This module contains the routines required by Image::ExifTool to read meta
613
618
  information from various format font files. Currently recognized font file
614
- types are OTF, TTF, TTC, DFONT, PFA, PFB, PFM, AFM, ACFM and AMFM.
619
+ types are OTF, TTF, TTC, DFONT, PFA, PFB, PFM, AFM, ACFM and AMFM. As well,
620
+ WOFF and WOFF2 font files are identified, but metadata is not currently
621
+ extracted from these formats.
615
622
 
616
623
  =head1 AUTHOR
617
624
 
@@ -115,6 +115,11 @@ my %gifMap = (
115
115
  ValueConv => '$val + 1',
116
116
  },
117
117
  5 => 'BackgroundColor',
118
+ 6 => {
119
+ Name => 'AspectRatio',
120
+ RawConv => '$val ? $val : undef',
121
+ ValueConv => '($val + 15) / 64',
122
+ },
118
123
  );
119
124
 
120
125
  # GIF Netscape 2.0 animation extension (ref 3)
@@ -573,6 +573,8 @@ my %epsg_vertcs = (
573
573
  3053 => 'Hjorsey 1955 Lambert',
574
574
  3057 => 'ISN93 Lambert 1993',
575
575
  3300 => 'Estonian Coordinate System of 1992',
576
+ 3786 => 'Popular Visualisation CRS / Mercator', #PH (NC)
577
+ 3857 => 'WGS 84 / Pseudo-Mercator', #PH (NC)
576
578
  20137 => 'Adindan UTM zone 37N',
577
579
  20138 => 'Adindan UTM zone 38N',
578
580
  20248 => 'AGD66 AMG zone 48',
@@ -16,7 +16,7 @@ use vars qw($VERSION);
16
16
  use Image::ExifTool qw(:DataAccess :Utils);
17
17
  use Image::ExifTool::QuickTime;
18
18
 
19
- $VERSION = '1.03';
19
+ $VERSION = '1.04';
20
20
 
21
21
  sub ProcessGoPro($$$);
22
22
  sub ProcessString($$$);
@@ -590,6 +590,7 @@ sub ProcessString($$$)
590
590
  # Process GoPro metadata (gpmd samples, GPMF box, or APP6) (ref PH/1/2)
591
591
  # Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
592
592
  # Returns: 1 on success
593
+ # - with hack to check for encrypted text in gpmd data (Rove Stealth 4K)
593
594
  sub ProcessGoPro($$$)
594
595
  {
595
596
  my ($et, $dirInfo, $tagTablePtr) = @_;
@@ -601,6 +602,14 @@ sub ProcessGoPro($$$)
601
602
  my $unknown = $verbose || $et->Options('Unknown');
602
603
  my ($size, $type, $unit, $scal, $setGroup0);
603
604
 
605
+ # the Rove Stealth 4K writes encrypted text here, so check for this first
606
+ # (really should check for this before loading GoPro module, but I was lazy) PHIL
607
+ if ($$dataPt =~ /^\0\0\xf2\xe1\xf0\xeeTT/) {
608
+ $et->VerboseDir('gpmd encrypted text', undef, length($$dataPt));
609
+ my $strmTbl = GetTagTable('Image::ExifTool::QuickTime::Stream');
610
+ Image::ExifTool::QuickTime::Process_text($et, $strmTbl, $dataPt);
611
+ return 1;
612
+ }
604
613
  $et->VerboseDir($$dirInfo{DirName} || 'GPMF', undef, $dirEnd-$pos) if $verbose;
605
614
  if ($pos) {
606
615
  my $parent = $$dirInfo{Parent};
@@ -890,7 +890,7 @@ sub ParsePictureTiming($$)
890
890
 
891
891
  #------------------------------------------------------------------------------
892
892
  # Process H.264 Supplementary Enhancement Information (ref 1/PH)
893
- # Inputs: 0) Exiftool ref, 1) dirInfo ref, 2) tag table ref
893
+ # Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) tag table ref
894
894
  # Returns: 1 if we processed payload type 5
895
895
  # Payload types:
896
896
  # 0 - buffer period
@@ -1,13 +1,15 @@
1
1
  #------------------------------------------------------------------------------
2
2
  # File: ID3.pm
3
3
  #
4
- # Description: Read ID3 meta information
4
+ # Description: Read ID3 and Lyrics3 meta information
5
5
  #
6
6
  # Revisions: 09/12/2005 - P. Harvey Created
7
+ # 09/08/2020 - PH Added Lyrics3 support
7
8
  #
8
9
  # References: 1) http://www.id3.org/
9
10
  # 2) http://www.mp3-tech.org/
10
11
  # 3) http://www.fortunecity.com/underworld/sonic/3/id3tag.html
12
+ # 4) https://id3.org/Lyrics3
11
13
  #------------------------------------------------------------------------------
12
14
 
13
15
  package Image::ExifTool::ID3;
@@ -16,7 +18,7 @@ use strict;
16
18
  use vars qw($VERSION);
17
19
  use Image::ExifTool qw(:DataAccess :Utils);
18
20
 
19
- $VERSION = '1.54';
21
+ $VERSION = '1.55';
20
22
 
21
23
  sub ProcessID3v2($$$);
22
24
  sub ProcessPrivate($$$);
@@ -68,13 +70,13 @@ my %dateTimeConv = (
68
70
  %Image::ExifTool::ID3::Main = (
69
71
  VARS => { NO_ID => 1 },
70
72
  NOTES => q{
71
- ExifTool extracts ID3 information from MP3, MPEG, AIFF, OGG, FLAC, APE, MPC
72
- and RealAudio files. ID3v2 tags which support multiple languages (eg.
73
- Comment and Lyrics) are extracted by specifying the tag name, followed by a
74
- dash ('-'), then a 3-character ISO 639-2 language code (eg. "Comment-spa").
75
- See L<http://www.id3.org/> for the official ID3 specification and
76
- L<http://www.loc.gov/standards/iso639-2/php/code_list.php> for a list of ISO
77
- 639-2 language codes.
73
+ ExifTool extracts ID3 and Lyrics3 information from MP3, MPEG, AIFF, OGG,
74
+ FLAC, APE, MPC and RealAudio files. ID3v2 tags which support multiple
75
+ languages (eg. Comment and Lyrics) are extracted by specifying the tag name,
76
+ followed by a dash ('-'), then a 3-character ISO 639-2 language code (eg.
77
+ "Comment-spa"). See L<http://www.id3.org/> for the official ID3
78
+ specification and L<http://www.loc.gov/standards/iso639-2/php/code_list.php>
79
+ for a list of ISO 639-2 language codes.
78
80
  },
79
81
  ID3v1 => {
80
82
  Name => 'ID3v1',
@@ -98,6 +100,24 @@ my %dateTimeConv = (
98
100
  },
99
101
  );
100
102
 
103
+ # Lyrics3 tags (ref 4)
104
+ %Image::ExifTool::ID3::Lyrics3 = (
105
+ GROUPS => { 1 => 'Lyrics3', 2 => 'Audio' },
106
+ NOTES => q{
107
+ ExifTool extracts Lyrics3 version 1.00 and 2.00 tags from any file that
108
+ supports ID3. See L<https://id3.org/Lyrics3> for the specification.
109
+ },
110
+ IND => 'Indications',
111
+ LYR => 'Lyrics',
112
+ INF => 'AdditionalInfo',
113
+ AUT => { Name => 'Author', Groups => { 2 => 'Author' } },
114
+ EAL => 'ExtendedAlbumName',
115
+ EAR => 'ExtendedArtistName',
116
+ ETT => 'ExtendedTrackTitle',
117
+ IMG => 'AssociatedImageFile',
118
+ CRC => 'CRC', #PH
119
+ );
120
+
101
121
  # Mapping for ID3v1 Genre numbers
102
122
  my %genre = (
103
123
  0 => 'Blues',
@@ -1347,7 +1367,7 @@ sub ProcessID3v2($$$)
1347
1367
  # Inputs: 0) ExifTool object reference, 1) dirInfo reference
1348
1368
  # Returns: 1 on success, 0 if this file didn't contain ID3 information
1349
1369
  # - also processes audio data if any ID3 information was found
1350
- # - sets ExifTool DoneID3 to 1 when called, or to 2 if an ID3v1 trailer exists
1370
+ # - sets ExifTool DoneID3 to 1 when called, or to trailer size if an ID3v1 trailer exists
1351
1371
  sub ProcessID3($$)
1352
1372
  {
1353
1373
  my ($et, $dirInfo) = @_;
@@ -1426,8 +1446,9 @@ sub ProcessID3($$)
1426
1446
  #
1427
1447
  # read ID3v1 trailer if it exists
1428
1448
  #
1449
+ my $trailSize = 0;
1429
1450
  if ($raf->Seek(-128, 2) and $raf->Read($tBuff, 128) == 128 and $tBuff =~ /^TAG/) {
1430
- $$et{DoneID3} = 2; # set to 2 as flag that trailer exists
1451
+ $trailSize = 128;
1431
1452
  %id3Trailer = (
1432
1453
  DataPt => \$tBuff,
1433
1454
  DataPos => $raf->Tell() - 128,
@@ -1437,8 +1458,59 @@ sub ProcessID3($$)
1437
1458
  $id3Len += length($tBuff);
1438
1459
  $rtnVal = 1;
1439
1460
  # load 'Enhanced TAG' information if available
1440
- if ($raf->Seek(-355, 2) and $raf->Read($eBuff, 227) == 227 and $eBuff =~ /^TAG+/) {
1461
+ my $eSize = 227; # size of ID3 Enhanced TAG info
1462
+ if ($raf->Seek(-$trailSize - $eSize, 2) and $raf->Read($eBuff, $eSize) == $eSize and $eBuff =~ /^TAG+/) {
1441
1463
  $id3Trailer{EnhancedTAG} = \$eBuff;
1464
+ $trailSize += $eSize;
1465
+ }
1466
+ $$et{DoneID3} = $trailSize; # save trailer size
1467
+ }
1468
+ #
1469
+ # read Lyrics3 trailer if it exists
1470
+ #
1471
+ if ($raf->Seek(-$trailSize-15, 2) and $raf->Read($buff, 15) == 15 and $buff =~ /^(.{6})LYRICS(END|200)$/) {
1472
+ my $ver = $2; # Lyrics3 version ('END' for version 1)
1473
+ my $len = ($ver eq 'END') ? 5100 : $1 + 15; # max Lyrics3 length
1474
+ my $tbl = GetTagTable('Image::ExifTool::ID3::Lyrics3');
1475
+ $len = $raf->Tell() if $len > $raf->Tell();
1476
+ if ($raf->Seek(-$len, 1) and $raf->Read($buff, $len) == $len and $buff =~ /LYRICSBEGIN/g) {
1477
+ my $pos = pos($buff);
1478
+ $$et{DoneID3} = $trailSize + $len - $pos + 11; # update trailer length
1479
+ my $oldIndent = $$et{INDENT};
1480
+ $$et{INDENT} .= '| ';
1481
+ if ($et->Options('Verbose')) {
1482
+ $et->VPrint(0, "Lyrics3:\n");
1483
+ $et->VerboseDir('Lyrics3', undef, $len);
1484
+ if ($pos > 11) {
1485
+ $buff = substr($buff, $pos - 11);
1486
+ $pos = 11;
1487
+ }
1488
+ $et->VerboseDump(\$buff);
1489
+ }
1490
+ if ($ver eq 'END') {
1491
+ # Lyrics3 v1.00
1492
+ my $val = substr($buff, $pos, $len - $pos - 9);
1493
+ $et->HandleTag($tbl, 'LYR', $et->Decode($val, 'Latin'));
1494
+ } else {
1495
+ # Lyrics3 v2.00
1496
+ for (;;) {
1497
+ # (note: the size field is 5 digits,, not 6 as per the documentation)
1498
+ last unless $buff =~ /\G(.{3})(\d{5})/g;
1499
+ my ($tag, $size) = ($1, $2);
1500
+ $pos += 8;
1501
+ last if $pos + $size > length($buff);
1502
+ unless ($$tbl{$tag}) {
1503
+ AddTagToTable($tbl, $tag, { Name => Image::ExifTool::MakeTagName("Lyrics3_$tag") });
1504
+ }
1505
+ $et->HandleTag($tbl, $tag, $et->Decode(substr($buff, $pos, $size), 'Latin'));
1506
+ $pos += $size;
1507
+ pos($buff) = $pos;
1508
+ }
1509
+ $pos == length($buff) - 15 or $et->Warn('Malformed Lyrics3 v2.00 block');
1510
+ }
1511
+ $$et{INDENT} = $oldIndent;
1512
+ } else {
1513
+ $et->Warn('Error reading Lyrics3 trailer');
1442
1514
  }
1443
1515
  }
1444
1516
  #
@@ -1583,6 +1655,8 @@ under the same terms as Perl itself.
1583
1655
 
1584
1656
  =item L<http://www.fortunecity.com/underworld/sonic/3/id3tag.html>
1585
1657
 
1658
+ =item L<https://id3.org/Lyrics3>
1659
+
1586
1660
  =back
1587
1661
 
1588
1662
  =head1 SEE ALSO
@@ -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',
@@ -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
@@ -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 = (
@@ -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.83';
65
+ $VERSION = '3.86';
66
66
 
67
67
  sub LensIDConv($$$);
68
68
  sub ProcessNikonAVI($$$);
@@ -449,6 +449,7 @@ sub GetAFPointGrid($$;$);
449
449
  # '92 3E 2D 88 2C 40 4B 0E' (22mm)
450
450
  # '92 40 2D 88 2C 40 4B 0E' (18mm)
451
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
452
453
  '02 3A 37 50 31 3D 02 00' => 'Sigma 24-50mm F4-5.6 UC',
453
454
  '26 48 37 56 24 24 1C 02' => 'Sigma 24-60mm F2.8 EX DG',
454
455
  'B6 48 37 56 24 24 1C 02' => 'Sigma 24-60mm F2.8 EX DG',
@@ -513,6 +514,7 @@ sub GetAFPointGrid($$;$);
513
514
  'CE 34 76 A0 38 40 4B 0E' => 'Sigma 150-500mm F5-6.3 DG OS APO HSM', #JD
514
515
  '81 34 76 A6 38 40 4B 0E' => 'Sigma 150-600mm F5-6.3 DG OS HSM | S', #Jaap Voets
515
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
516
518
  '26 40 7B A0 34 40 1C 02' => 'Sigma APO 170-500mm F5-6.3 Aspherical RF',
517
519
  'A7 49 80 A0 24 24 4B 06' => 'Sigma APO 200-500mm F2.8 EX DG',
518
520
  '48 3C 8E B0 3C 3C 4B 02' => 'Sigma APO 300-800mm F5.6 EX DG HSM',
@@ -579,6 +581,7 @@ sub GetAFPointGrid($$;$);
579
581
  '4D 41 3C 8E 2B 40 62 02' => 'Tamron AF 28-300mm f/3.5-6.3 XR Di LD Aspherical (IF) (A061)',
580
582
  '4D 41 3C 8E 2C 40 62 02' => 'Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical (IF) (185D)',
581
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
582
585
  '00 47 53 80 30 3C 00 06' => 'Tamron AF 55-200mm f/4-5.6 Di II LD (A15)',
583
586
  'F7 53 5C 80 24 24 84 06' => 'Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)',
584
587
  'FE 53 5C 80 24 24 84 06' => 'Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)',
@@ -711,6 +714,7 @@ sub GetAFPointGrid($$;$);
711
714
  '00 48 80 80 30 30 00 00' => 'Nikkor 200mm f/4 AiS',
712
715
  '00 40 11 11 2C 2C 00 00' => 'Samyang 8mm f/3.5 Fish-Eye',
713
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
714
718
  );
715
719
 
716
720
  # text encoding used in LocationInfo (ref PH)
@@ -878,6 +882,38 @@ my %afPoints39 = (
878
882
  10 => 'E3', 20 => 'B9', 30 => 'D4',
879
883
  );
880
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
+
881
917
  # AF point indices for models with 135 focus points, eg. 1J1 (ref PH)
882
918
  # - 9 rows (A-I) with 15 columns (1-15), center is E8
883
919
  # - odd columns, columns 2 and 14, and the remaining corner points are
@@ -1540,7 +1576,7 @@ my %binaryDataAttrs = (
1540
1576
  0x008c => {
1541
1577
  Name => 'ContrastCurve', #JD
1542
1578
  Writable => 'undef',
1543
- Flags => [ 'Binary', 'Protected' ],
1579
+ Flags => [ 'Binary', 'Protected', 'Drop' ], # (drop because not found in Nikon JPEG's)
1544
1580
  },
1545
1581
  # ColorHue: MODE1/MODE1a=sRGB, MODE2=Adobe RGB, MODE3a=more saturated sRGB
1546
1582
  # --> should really be called ColorSpace or ColorMode, but that would conflict with other tags
@@ -1785,6 +1821,16 @@ my %binaryDataAttrs = (
1785
1821
  ByteOrder => 'LittleEndian',
1786
1822
  },
1787
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
+ },
1788
1834
  { # (D610 firmware version 1.00)
1789
1835
  Condition => '$$valPt =~ /^0232/',
1790
1836
  Name => 'ShotInfoD610',
@@ -1834,6 +1880,7 @@ my %binaryDataAttrs = (
1834
1880
  7 => 'Unpacked 12 bits', #IB (padded to 16)
1835
1881
  8 => 'Small', #IB
1836
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)
1837
1884
  },
1838
1885
  },
1839
1886
  0x0094 => { Name => 'SaturationAdj', Writable => 'int16s' },
@@ -3300,6 +3347,7 @@ my %binaryDataAttrs = (
3300
3347
  15 => 'Dynamic Area (72 points)', #PH
3301
3348
  16 => 'Group Area (HL)', #28
3302
3349
  17 => 'Group Area (VL)', #28
3350
+ 18 => 'Dynamic Area (49 points)', #28
3303
3351
  128 => 'Single', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V2,1V3)
3304
3352
  129 => 'Auto (41 points)', #PH (1J1,1J2,1J3,1J4,1S1,1S2,1V1,1V2,1V3,AW1)
3305
3353
  130 => 'Subject Tracking (41 points)', #PH (1J1,1J4,1J3)
@@ -3337,6 +3385,10 @@ my %binaryDataAttrs = (
3337
3385
  197 => 'Auto', #PH (Z7)
3338
3386
  198 => 'Auto (198)', #PH (Z7) (focus lock with AF-C maybe?)
3339
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)
3340
3392
  },
3341
3393
  },
3342
3394
  ],
@@ -3355,12 +3407,14 @@ my %binaryDataAttrs = (
3355
3407
  6 => 'On (105-point)', #PH (1J4/1V3[128/130])
3356
3408
  7 => 'On (153-point)', #PH (D5/D500/D850)
3357
3409
  8 => 'On (81-point)', #38
3410
+ 9 => 'On (105-point)', #28 (D6)
3358
3411
  },
3359
3412
  },
3360
3413
  7 => [
3361
3414
  { #PH/JD
3362
3415
  Name => 'PrimaryAFPoint',
3363
- 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"',
3364
3418
  Notes => q{
3365
3419
  models with 51-point AF -- 5 rows (A-E) and 11 columns (1-11): D3, D3S, D3X,
3366
3420
  D4, D4S, D300, D300S, D700, D800, D800e and D810
@@ -3495,7 +3549,7 @@ my %binaryDataAttrs = (
3495
3549
  8 => [
3496
3550
  { #JD/PH
3497
3551
  Name => 'AFPointsUsed',
3498
- Condition => '$$self{PhaseDetectAF} < 2',
3552
+ Condition => '$$self{PhaseDetectAF} < 2 and $$self{AFInfo2Version} ne "0301"',
3499
3553
  Notes => q{
3500
3554
  models with 51-point AF -- 5 rows: A1-9, B1-11, C1-11, D1-11, E1-9. Center
3501
3555
  point is C6
@@ -3614,6 +3668,8 @@ my %binaryDataAttrs = (
3614
3668
  },
3615
3669
  { #PH
3616
3670
  Name => 'AFPointsUsed',
3671
+ # version 301 uses a separate field at offset 0x0a for this tag (ref 28)
3672
+ Condition => '$$self{AFInfo2Version} ne "0301"',
3617
3673
  Format => 'undef[7]',
3618
3674
  ValueConv => 'join(" ", unpack("H2"x7, $val))',
3619
3675
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
@@ -3621,6 +3677,19 @@ my %binaryDataAttrs = (
3621
3677
  PrintConvInv => '$val=~s/Unknown \\((.*)\\)/$1/; $val',
3622
3678
  },
3623
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
+ },
3624
3693
  0x10 => { #PH (D90 and D5000)
3625
3694
  Name => 'AFImageWidth',
3626
3695
  Condition => '$$self{AFInfo2Version} eq "0100"',
@@ -3663,11 +3732,21 @@ my %binaryDataAttrs = (
3663
3732
  Format => 'int16u',
3664
3733
  RawConv => '$val ? $val : undef',
3665
3734
  },
3666
- 0x1c => { #PH
3667
- Name => 'ContrastDetectAFInFocus',
3668
- Condition => '$$self{AFInfo2Version} eq "0100"',
3669
- PrintConv => { 0 => 'No', 1 => 'Yes' },
3670
- },
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
+ ],
3671
3750
  # 0x1d - always zero (with or without live view)
3672
3751
  0x2a => { #PH (Z7)
3673
3752
  Name => 'AFImageWidth',
@@ -3683,14 +3762,31 @@ my %binaryDataAttrs = (
3683
3762
  },
3684
3763
  0x2e => { #PH (Z7)
3685
3764
  Name => 'AFAreaXPosition',
3686
- Condition => '$$self{ContrastDetectAF} == 2 and $$self{AFInfo2Version} =~ /^03/',
3687
- Format => 'int16u',
3688
- },
3689
- 0x30 => { #PH (Z7)
3690
- Name => 'AFAreaYPosition',
3691
- 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
+ },
3692
3769
  Format => 'int16u',
3693
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
+ ],
3694
3790
  0x32 => { #PH (Z7)
3695
3791
  Name => 'AFAreaWidth',
3696
3792
  Condition => '$$self{AFInfo2Version} =~ /^03/',
@@ -3703,6 +3799,19 @@ my %binaryDataAttrs = (
3703
3799
  Format => 'int16u',
3704
3800
  RawConv => '$val ? $val : undef',
3705
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
+ },
3706
3815
  0x44 => [
3707
3816
  {
3708
3817
  Name => 'PrimaryAFPoint',
@@ -3802,6 +3911,7 @@ my %binaryDataAttrs = (
3802
3911
  # (don't know what the difference between 1 and 2 is)
3803
3912
  1 => 'On (1)',
3804
3913
  2 => 'On (2)',
3914
+ 3 => 'On (Zoom)', #28
3805
3915
  },
3806
3916
  },
3807
3917
  1 => {
@@ -3811,6 +3921,7 @@ my %binaryDataAttrs = (
3811
3921
  PrintConvInv => '$val eq "n/a" ? 255 : $val',
3812
3922
  },
3813
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)
3814
3925
  Name => 'AFFineTuneAdj',
3815
3926
  Priority => 0, # so other value takes priority if it exists
3816
3927
  Notes => 'may only be valid for saved lenses',
@@ -3818,6 +3929,14 @@ my %binaryDataAttrs = (
3818
3929
  PrintConv => '$val > 0 ? "+$val" : $val',
3819
3930
  PrintConvInv => '$val',
3820
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
+ },
3821
3940
  );
3822
3941
 
3823
3942
  # Nikon NEF processing information (ref forum6281)