exiftool_vendored 11.53.0 → 11.54.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.

@@ -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.75';
52
+ $VERSION = '2.76';
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)
@@ -597,61 +597,68 @@ $VERSION = '2.75';
597
597
  '65535.53' => 'Sony FE 100-400mm F4.5-5.6 GM OSS + 2X Teleconverter', #JR (33078 - SEL100400GM + SEL20TC)
598
598
  '65535.54' => 'Sony FE 400mm F2.8 GM OSS + 1.4X Teleconverter', #IB (33079 - SEL400F28GM + SEL14TC)
599
599
  '65535.55' => 'Sony FE 400mm F2.8 GM OSS + 2X Teleconverter', #JR (33080 - SEL400F28GM + SEL20TC)
600
+ '65535.56' => 'Sony FE 200-600mm F5.6-6.3 G OSS + 1.4X Teleconverter', #JR (NC)
601
+ '65535.57' => 'Sony FE 200-600mm F5.6-6.3 G OSS + 2X Teleconverter', #JR
602
+ '65535.58' => 'Sony FE 600mm F4 GM OSS + 1.4X Teleconverter', #JR (NC)
603
+ '65535.59' => 'Sony FE 600mm F4 GM OSS + 2X Teleconverter', #JR
600
604
  #
601
605
  # 3rd party E lenses
602
606
  #
603
- '65535.56' => 'Samyang AF 50mm F1.4 FE', #JR (32789)
604
- '65535.57' => 'Samyang AF 14mm F2.8 FE', #JR (32790 and 51505)
605
- '65535.58' => 'Samyang AF 24mm F2.8', #JR (32794)
606
- '65535.59' => 'Samyang AF 35mm F2.8 FE', #PH (51505)
607
- '65535.60' => 'Samyang AF 35mm F1.4', #IB (51507)
608
- '65535.61' => 'Sigma 19mm F2.8 [EX] DN', #JR (0)
609
- '65535.62' => 'Sigma 30mm F2.8 [EX] DN', #JR (0)
610
- '65535.63' => 'Sigma 60mm F2.8 DN', #JR (0)
611
- '65535.64' => 'Sigma 30mm F1.4 DC DN | C', #IB (50480) (016)
612
- '65535.65' => 'Sigma 85mm F1.4 DG HSM | A', #JR (50499) (018)
613
- '65535.66' => 'Sigma 16mm F1.4 DC DN | C', #JR (50503) (017)
614
- '65535.67' => 'Sigma 105mm F1.4 DG HSM | A', #IB (50507) (018)
615
- '65535.68' => 'Sigma 56mm F1.4 DC DN | C', #JR (50508) (018)
616
- '65535.69' => 'Sigma 70-200mm F2.8 DG OS HSM | S',#IB (50512) (018)
617
- '65535.70' => 'Sigma 70mm F2.8 DG MACRO | A', #JR (50513) (018)
618
- '65535.71' => 'Tamron 18-200mm F3.5-6.3 Di III VC', #JR (0 - Model B011)
619
- '65535.72' => 'Tamron 28-75mm F2.8 Di III RXD', #JR (49457 - Model A036)
620
- '65535.73' => 'Tokina FiRIN 20mm F2 FE MF', #JR (0)
621
- '65535.74' => 'Tokina FiRIN 20mm F2 FE AF', #JR (49712 or 0)
622
- '65535.75' => 'Tokina FiRIN 100mm F2.8 FE MACRO',#JR (49713)
623
- '65535.76' => 'Voigtlander SUPER WIDE-HELIAR 15mm F4.5 III', #JR (50992)
624
- '65535.77' => 'Voigtlander HELIAR-HYPER WIDE 10mm F5.6', #IB (50993)
625
- '65535.78' => 'Voigtlander ULTRA WIDE-HELIAR 12mm F5.6 III', #IB (50994)
626
- '65535.79' => 'Voigtlander MACRO APO-LANTHAR 65mm F2 Aspherical', #JR (50995)
627
- '65535.80' => 'Voigtlander NOKTON 40mm F1.2 Aspherical', #JR (50996)
628
- '65535.81' => 'Voigtlander NOKTON classic 35mm F1.4', #JR (50997)
629
- '65535.82' => 'Voigtlander MACRO APO-LANTHAR 110mm F2.5', #JR (50998)
630
- '65535.83' => 'Voigtlander COLOR-SKOPAR 21mm F3.5 Aspherical', #IB (50999)
631
- '65535.84' => 'Voigtlander NOKTON 50mm F1.2 Aspherical', #JR (51000)
632
- '65535.85' => 'Zeiss Touit 12mm F2.8', #JR (49201 or 0)
633
- '65535.86' => 'Zeiss Touit 32mm F1.8', #JR (49202 or 0)
634
- '65535.87' => 'Zeiss Touit 50mm F2.8 Macro', #JR (49203 or 0)
635
- '65535.88' => 'Zeiss Batis 25mm F2', #JR (49216)
636
- '65535.89' => 'Zeiss Batis 85mm F1.8', #JR (49217)
637
- '65535.90' => 'Zeiss Batis 18mm F2.8', #IB (49218)
638
- '65535.91' => 'Zeiss Batis 135mm F2.8', #IB (49219)
639
- '65535.92' => 'Zeiss Batis 40mm F2 CF', #JR (49220)
640
- '65535.93' => 'Zeiss Loxia 50mm F2', #JR (49232 or 0)
641
- '65535.94' => 'Zeiss Loxia 35mm F2', #JR (49233 or 0)
642
- '65535.95' => 'Zeiss Loxia 21mm F2.8', #JR (49234)
643
- '65535.96' => 'Zeiss Loxia 85mm F2.4', #JR (49235)
644
- '65535.97' => 'Zeiss Loxia 25mm F2.4', #JR (49236)
607
+ '65535.60' => 'Samyang AF 50mm F1.4 FE', #JR (32789)
608
+ '65535.61' => 'Samyang AF 14mm F2.8 FE', #JR (32790 and 51505)
609
+ '65535.62' => 'Samyang AF 24mm F2.8', #JR (32794)
610
+ '65535.63' => 'Samyang AF 35mm F2.8 FE', #PH (51505)
611
+ '65535.64' => 'Samyang AF 35mm F1.4', #IB (51507)
612
+ '65535.65' => 'Samyang AF 85mm F1.4', #IB (32823)
613
+ '65535.66' => 'Sigma 19mm F2.8 [EX] DN', #JR (0)
614
+ '65535.67' => 'Sigma 30mm F2.8 [EX] DN', #JR (0)
615
+ '65535.68' => 'Sigma 60mm F2.8 DN', #JR (0)
616
+ '65535.69' => 'Sigma 30mm F1.4 DC DN | C', #IB (50480) (016)
617
+ '65535.70' => 'Sigma 85mm F1.4 DG HSM | A', #JR (50499) (018)
618
+ '65535.71' => 'Sigma 16mm F1.4 DC DN | C', #JR (50503) (017)
619
+ '65535.72' => 'Sigma 105mm F1.4 DG HSM | A', #IB (50507) (018)
620
+ '65535.73' => 'Sigma 56mm F1.4 DC DN | C', #JR (50508) (018)
621
+ '65535.74' => 'Sigma 70-200mm F2.8 DG OS HSM | S',#IB (50512) (018)
622
+ '65535.75' => 'Sigma 70mm F2.8 DG MACRO | A', #JR (50513) (018)
623
+ '65535.76' => 'Tamron 18-200mm F3.5-6.3 Di III VC', #JR (0 - Model B011)
624
+ '65535.77' => 'Tamron 28-75mm F2.8 Di III RXD', #JR (49457 - Model A036)
625
+ '65535.78' => 'Tamron 17-28mm F2.8 Di III RXD', #JR
626
+ '65535.79' => 'Tokina FiRIN 20mm F2 FE MF', #JR (0)
627
+ '65535.80' => 'Tokina FiRIN 20mm F2 FE AF', #JR (49712 or 0)
628
+ '65535.81' => 'Tokina FiRIN 100mm F2.8 FE MACRO',#JR (49713)
629
+ '65535.82' => 'Voigtlander SUPER WIDE-HELIAR 15mm F4.5 III', #JR (50992)
630
+ '65535.83' => 'Voigtlander HELIAR-HYPER WIDE 10mm F5.6', #IB (50993)
631
+ '65535.84' => 'Voigtlander ULTRA WIDE-HELIAR 12mm F5.6 III', #IB (50994)
632
+ '65535.85' => 'Voigtlander MACRO APO-LANTHAR 65mm F2 Aspherical', #JR (50995)
633
+ '65535.86' => 'Voigtlander NOKTON 40mm F1.2 Aspherical', #JR (50996)
634
+ '65535.87' => 'Voigtlander NOKTON classic 35mm F1.4', #JR (50997)
635
+ '65535.88' => 'Voigtlander MACRO APO-LANTHAR 110mm F2.5', #JR (50998)
636
+ '65535.89' => 'Voigtlander COLOR-SKOPAR 21mm F3.5 Aspherical', #IB (50999)
637
+ '65535.90' => 'Voigtlander NOKTON 50mm F1.2 Aspherical', #JR (51000)
638
+ '65535.91' => 'Voigtlander NOKTON 21mm F1.4 Aspherical', #JR
639
+ '65535.92' => 'Zeiss Touit 12mm F2.8', #JR (49201 or 0)
640
+ '65535.93' => 'Zeiss Touit 32mm F1.8', #JR (49202 or 0)
641
+ '65535.94' => 'Zeiss Touit 50mm F2.8 Macro', #JR (49203 or 0)
642
+ '65535.95' => 'Zeiss Batis 25mm F2', #JR (49216)
643
+ '65535.96' => 'Zeiss Batis 85mm F1.8', #JR (49217)
644
+ '65535.97' => 'Zeiss Batis 18mm F2.8', #IB (49218)
645
+ '65535.98' => 'Zeiss Batis 135mm F2.8', #IB (49219)
646
+ '65535.99' => 'Zeiss Batis 40mm F2 CF', #JR (49220)
647
+ '65535.100' => 'Zeiss Loxia 50mm F2', #JR (49232 or 0)
648
+ '65535.101' => 'Zeiss Loxia 35mm F2', #JR (49233 or 0)
649
+ '65535.102' => 'Zeiss Loxia 21mm F2.8', #JR (49234)
650
+ '65535.103' => 'Zeiss Loxia 85mm F2.4', #JR (49235)
651
+ '65535.104' => 'Zeiss Loxia 25mm F2.4', #JR (49236)
645
652
  #
646
653
  # other lenses
647
654
  #
648
- '65535.98' => 'Arax MC 35mm F2.8 Tilt+Shift', #JD
649
- '65535.99' => 'Arax MC 80mm F2.8 Tilt+Shift', #JD
650
- '65535.100' => 'Zenitar MF 16mm F2.8 Fisheye M42', #JD
651
- '65535.101' => 'Samyang 500mm Mirror F8.0', #19
652
- '65535.102' => 'Pentacon Auto 135mm F2.8', #19
653
- '65535.103' => 'Pentacon Auto 29mm F2.8', #19
654
- '65535.104' => 'Helios 44-2 58mm F2.0', #19
655
+ '65535.105' => 'Arax MC 35mm F2.8 Tilt+Shift', #JD
656
+ '65535.106' => 'Arax MC 80mm F2.8 Tilt+Shift', #JD
657
+ '65535.107' => 'Zenitar MF 16mm F2.8 Fisheye M42', #JD
658
+ '65535.108' => 'Samyang 500mm Mirror F8.0', #19
659
+ '65535.109' => 'Pentacon Auto 135mm F2.8', #19
660
+ '65535.110' => 'Pentacon Auto 29mm F2.8', #19
661
+ '65535.111' => 'Helios 44-2 58mm F2.0', #19
655
662
  );
656
663
 
657
664
  %minoltaTeleconverters = (
@@ -2845,7 +2845,7 @@ my %binaryDataAttrs = (
2845
2845
  Name => 'HuffmanTable',
2846
2846
  Flags => [ 'Unknown', 'Binary' ],
2847
2847
  Writable => 0,
2848
- Notes => 'found in K10D, K20D and K2000D PEF images',
2848
+ Notes => 'found in K10D, K20D and K2000 PEF images',
2849
2849
  },
2850
2850
  0x0221 => { #28
2851
2851
  Name => 'KelvinWB',
@@ -15,7 +15,7 @@ use Image::ExifTool::Exif;
15
15
  use Image::ExifTool::IPTC;
16
16
  use Image::ExifTool::XMP;
17
17
 
18
- $VERSION = '1.05';
18
+ $VERSION = '1.06';
19
19
 
20
20
  sub ProcessPhotoMechanic($$);
21
21
 
@@ -200,7 +200,7 @@ sub ProcessPhotoMechanic($$)
200
200
  if (defined $newBuff) {
201
201
  $newPt = \$newBuff; # write out the modified trailer
202
202
  my $pad = 0x800 - length($newBuff);
203
- if ($pad > 0 and not $et->Options('Compact')) {
203
+ if ($pad > 0 and not $$et{OPTIONS}{Compact}{NoPadding}) {
204
204
  # pad out to 2kB like PhotoMechanic does
205
205
  $newBuff .= "\0" x $pad;
206
206
  }
@@ -514,6 +514,7 @@ my %eeBox = (
514
514
  Name => 'XMP',
515
515
  # *** this is where ExifTool writes XMP in MP4 videos (as per XMP spec) ***
516
516
  Condition => '$$valPt=~/^\xbe\x7a\xcf\xcb\x97\xa9\x42\xe8\x9c\x71\x99\x94\x91\xe3\xaf\xac/',
517
+ WriteGroup => 'XMP', # (write main XMP tags here)
517
518
  SubDirectory => {
518
519
  TagTable => 'Image::ExifTool::XMP::Main',
519
520
  Start => 16,
@@ -991,6 +992,7 @@ my %eeBox = (
991
992
  },
992
993
  trak => {
993
994
  Name => 'Track',
995
+ CanCreate => 0, # don't create this atom
994
996
  SubDirectory => { TagTable => 'Image::ExifTool::QuickTime::Track' },
995
997
  },
996
998
  udta => {
@@ -1196,11 +1198,12 @@ my %eeBox = (
1196
1198
  { #https://github.com/google/spatial-media/blob/master/docs/spherical-video-rfc.md
1197
1199
  Name => 'SphericalVideoXML',
1198
1200
  Condition => '$$valPt=~/^\xff\xcc\x82\x63\xf8\x55\x4a\x93\x88\x14\x58\x7a\x02\x52\x1f\xdd/',
1199
- Flags => [ 'Binary', 'BlockExtract' ],
1200
- Writable => 0,
1201
+ WriteGroup => 'GSpherical', # write only GSpherical XMP tags here
1202
+ HandlerType => 'vide', # only write in video tracks
1201
1203
  SubDirectory => {
1202
1204
  TagTable => 'Image::ExifTool::XMP::Main',
1203
1205
  Start => 16,
1206
+ WriteProc => 'Image::ExifTool::XMP::WriteGSpherical',
1204
1207
  },
1205
1208
  },
1206
1209
  {
@@ -1473,6 +1476,7 @@ my %eeBox = (
1473
1476
  hinv => 'HintVersion', #PH (guess)
1474
1477
  XMP_ => { #PH (Adobe CS3 Bridge)
1475
1478
  Name => 'XMP',
1479
+ WriteGroup => 'XMP', # (write main tags here)
1476
1480
  # *** this is where ExifTool writes XMP in MOV videos (as per XMP spec) ***
1477
1481
  SubDirectory => { TagTable => 'Image::ExifTool::XMP::Main' },
1478
1482
  },
@@ -2364,7 +2368,7 @@ my %eeBox = (
2364
2368
  }],
2365
2369
  'xml ' => {
2366
2370
  Name => 'XML',
2367
- Flags => [ 'Binary', 'Protected', 'BlockExtract' ],
2371
+ Flags => [ 'Binary', 'Protected' ],
2368
2372
  SubDirectory => {
2369
2373
  TagTable => 'Image::ExifTool::XMP::XML',
2370
2374
  IgnoreProp => { NonRealTimeMeta => 1 }, # ignore container for Sony 'nrtm'
@@ -22,7 +22,7 @@ use vars qw($VERSION %samsungLensTypes);
22
22
  use Image::ExifTool qw(:DataAccess :Utils);
23
23
  use Image::ExifTool::Exif;
24
24
 
25
- $VERSION = '1.45';
25
+ $VERSION = '1.46';
26
26
 
27
27
  sub WriteSTMN($$$);
28
28
  sub ProcessINFO($$$);
@@ -974,6 +974,7 @@ my %formatMinMax = (
974
974
  '0x0a30' => { Name => 'EmbeddedVideoFile', Groups => { 2 => 'Video' }, Binary => 1 }, #forum7161
975
975
  # 0x0aa1-name - seen 'MCC_Data'
976
976
  # 0x0aa1 - seen '234','222'
977
+ # 0x0ab0-name - seen 'DualShot_Meta_Info'
977
978
  '0x0ab1-name' => 'DepthMapName', # seen 'DualShot_DepthMap_1' (SM-N950U)
978
979
  '0x0ab1' => { Name => 'DepthMapData', Binary => 1 },
979
980
  # 0x0ab3-name - seen 'DualShot_Extra_Info' (SM-N950U)
@@ -993,8 +994,28 @@ my %formatMinMax = (
993
994
  GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
994
995
  FIRST_ENTRY => 0,
995
996
  FORMAT => 'int32u',
996
- 9 => 'DepthMapWidth',
997
- 10 => 'DepthMapHeight',
997
+ 0 => {
998
+ Name => 'DualShotInfoVersion', # (NC)
999
+ Format => 'int16u',
1000
+ RawConv => '$$self{DualShotInfoVersion} = $val; undef',
1001
+ Hidden => 1,
1002
+ },
1003
+ 9 => {
1004
+ Name => 'DepthMapWidth',
1005
+ Condition => '$$self{DualShotInfoVersion} < 4', # (tested only with versions: 1,4)
1006
+ },
1007
+ 10 => {
1008
+ Name => 'DepthMapHeight',
1009
+ Condition => '$$self{DualShotInfoVersion} < 4', # (tested only with versions: 1,4)
1010
+ },
1011
+ 16 => {
1012
+ Name => 'DepthMapWidth',
1013
+ Condition => '$$self{DualShotInfoVersion} >= 4', # (tested only with versions: 1,4)
1014
+ },
1015
+ 17 => {
1016
+ Name => 'DepthMapHeight',
1017
+ Condition => '$$self{DualShotInfoVersion} >= 4', # (tested only with versions: 1,4)
1018
+ },
998
1019
  );
999
1020
 
1000
1021
  # Samsung composite tags
@@ -32,7 +32,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
32
32
  use Image::ExifTool::Exif;
33
33
  use Image::ExifTool::Minolta;
34
34
 
35
- $VERSION = '3.07';
35
+ $VERSION = '3.08';
36
36
 
37
37
  sub ProcessSRF($$$);
38
38
  sub ProcessSR2($$$);
@@ -121,6 +121,7 @@ my %sonyLensTypes2 = (
121
121
  32821 => 'Sony FE 24-70mm F2.8 GM', #JR/IB
122
122
  32822 => 'Sony FE 50mm F1.4 ZA', #JR
123
123
  32823 => 'Sony FE 85mm F1.4 GM', #JR/IB
124
+ 32823.1 => 'Samyang AF 85mm F1.4', #IB
124
125
  32824 => 'Sony FE 50mm F1.8', #JR (Sony code 'SEL50F18F' with trailing "F" as compared to 'SEL50F18' for 32790)
125
126
 
126
127
  32826 => 'Sony FE 21mm F2.8 (SEL28F20 + SEL075UWC)', #JR # (+ Ultra-wide converter)
@@ -146,6 +147,10 @@ my %sonyLensTypes2 = (
146
147
  33078 => 'Sony FE 100-400mm F4.5-5.6 GM OSS + 2X Teleconverter', #JR
147
148
  33079 => 'Sony FE 400mm F2.8 GM OSS + 1.4X Teleconverter', #IB
148
149
  33080 => 'Sony FE 400mm F2.8 GM OSS + 2X Teleconverter', #JR
150
+ 33081 => 'Sony FE 200-600mm F5.6-6.3 G OSS + 1.4X Teleconverter', #JR (NC)
151
+ 33082 => 'Sony FE 200-600mm F5.6-6.3 G OSS + 2X Teleconverter', #JR
152
+ 33083 => 'Sony FE 600mm F4 GM OSS + 1.4X Teleconverter', #JR (NC)
153
+ 33084 => 'Sony FE 600mm F4 GM OSS + 2X Teleconverter', #JR
149
154
 
150
155
  49201 => 'Zeiss Touit 12mm F2.8', #JR (lens firmware Ver.02)
151
156
  49202 => 'Zeiss Touit 32mm F1.8', #JR (lens firmware Ver.02)
@@ -162,6 +167,7 @@ my %sonyLensTypes2 = (
162
167
  49236 => 'Zeiss Loxia 25mm F2.4', #JR
163
168
 
164
169
  49457 => 'Tamron 28-75mm F2.8 Di III RXD', #JR (Model A036)
170
+ 49458 => 'Tamron 17-28mm F2.8 Di III RXD', #JR
165
171
 
166
172
  49712 => 'Tokina FiRIN 20mm F2 FE AF', # (firmware Ver.01)
167
173
  49713 => 'Tokina FiRIN 100mm F2.8 FE MACRO', # (firmware Ver.01)
@@ -197,6 +203,7 @@ my %sonyLensTypes2 = (
197
203
  50998 => 'Voigtlander MACRO APO-LANTHAR 110mm F2.5', #JR
198
204
  50999 => 'Voigtlander COLOR-SKOPAR 21mm F3.5 Aspherical', #IB
199
205
  51000 => 'Voigtlander NOKTON 50mm F1.2 Aspherical', #JR
206
+ 51001 => 'Voigtlander NOKTON 21mm F1.4 Aspherical', #JR
200
207
 
201
208
  # lenses listed in the Sigma MC-11 list, but not yet seen:
202
209
  # 504xx => 'Sigma 18-200mm F3.5-6.3 DC MACRO OS HSM | C + MC-11', # (014)
@@ -12,7 +12,7 @@ meta information extracted from or written to a file.
12
12
  =head1 TAG TABLES
13
13
 
14
14
  The tables listed below give the names of all tags recognized by ExifTool.
15
- They contain a total of 22577 tags, with 15020 unique tag names.
15
+ They contain a total of 22579 tags, with 15020 unique tag names.
16
16
 
17
17
  B<Tag ID>, B<Index#> or B<Sequence> is given in the first column of each
18
18
  table. A B<Tag ID> is the computer-readable equivalent of a tag name, and
@@ -2398,7 +2398,8 @@ These tags belong to the ExifTool XMP-GPano family 1 group.
2398
2398
  =head3 XMP GSpherical Tags
2399
2399
 
2400
2400
  Not actually XMP. These RDF/XML tags are used in Google spherical MP4
2401
- videos. See
2401
+ videos. These tags are written into the video track of MOV/MP4 files, and
2402
+ not at the top level like other XMP tags. See
2402
2403
  L<https://github.com/google/spatial-media/blob/master/docs/spherical-video-rfc.md>
2403
2404
  for the specification.
2404
2405
 
@@ -15572,6 +15573,8 @@ as the Galaxy S4 and Tab S.
15572
15573
  ------ -------- --------
15573
15574
  9 DepthMapWidth no
15574
15575
  10 DepthMapHeight no
15576
+ 16 DepthMapWidth no
15577
+ 17 DepthMapHeight no
15575
15578
 
15576
15579
  =head3 Samsung sec Tags
15577
15580
 
@@ -41,7 +41,10 @@ sub ExtractTags($$$;$$@);
41
41
  PrintConv => '$self->ConvertDateTime($val)',
42
42
  },
43
43
  'encoding' => { },
44
- 'info' => { SubDirectory => { TagTable => 'Image::ExifTool::Torrent::Info' } },
44
+ 'info' => {
45
+ SubDirectory => { TagTable => 'Image::ExifTool::Torrent::Info' },
46
+ Notes => 'extracted as a structure with the Struct option',
47
+ },
45
48
  'url-list' => { Name => 'URLList1' },
46
49
  );
47
50
 
@@ -17,44 +17,64 @@ package Image::ExifTool::Validate;
17
17
  use strict;
18
18
  use vars qw($VERSION %exifSpec);
19
19
 
20
- $VERSION = '1.14';
20
+ $VERSION = '1.15';
21
21
 
22
22
  use Image::ExifTool qw(:Utils);
23
23
  use Image::ExifTool::Exif;
24
24
 
25
25
  # EXIF table tag ID's which are part of the EXIF 2.32 specification
26
+ # (with ExifVersion numbers for tags where I can determine the version)
26
27
  # (also used by BuildTagLookup to add underlines in HTML version of EXIF Tag Table)
27
28
  %exifSpec = (
28
- 0x1 => 1,
29
- 0x100 => 1, 0x8298 => 1, 0x9207 => 1, 0xa217 => 1,
30
- 0x101 => 1, 0x829a => 1, 0x9208 => 1, 0xa300 => 1,
31
- 0x102 => 1, 0x829d => 1, 0x9209 => 1, 0xa301 => 1,
32
- 0x103 => 1, 0x8769 => 1, 0x920a => 1, 0xa302 => 1,
33
- 0x106 => 1, 0x8822 => 1, 0x9214 => 1, 0xa401 => 1,
34
- 0x10e => 1, 0x8824 => 1, 0x927c => 1, 0xa402 => 1,
35
- 0x10f => 1, 0x8825 => 1, 0x9286 => 1, 0xa403 => 1,
36
- 0x110 => 1, 0x8827 => 1, 0x9290 => 1, 0xa404 => 1,
37
- 0x111 => 1, 0x8828 => 1, 0x9291 => 1, 0xa405 => 1,
38
- 0x112 => 1, 0x8830 => 1, 0x9292 => 1, 0xa406 => 1,
39
- 0x115 => 1, 0x8831 => 1, 0x9400 => 1, 0xa407 => 1,
40
- 0x116 => 1, 0x8832 => 1, 0x9401 => 1, 0xa408 => 1,
41
- 0x117 => 1, 0x8833 => 1, 0x9402 => 1, 0xa409 => 1,
42
- 0x11a => 1, 0x8834 => 1, 0x9403 => 1, 0xa40a => 1,
43
- 0x11b => 1, 0x8835 => 1, 0x9404 => 1, 0xa40b => 1,
44
- 0x11c => 1, 0x9000 => 1, 0x9405 => 1, 0xa40c => 1,
45
- 0x128 => 1, 0x9003 => 1, 0xa000 => 1, 0xa460 => 1,
46
- 0x12d => 1, 0x9004 => 1, 0xa001 => 1, 0xa461 => 1,
47
- 0x131 => 1, 0x9010 => 1, 0xa002 => 1, 0xa462 => 1,
48
- 0x132 => 1, 0x9011 => 1, 0xa003 => 1, 0xa420 => 1,
49
- 0x13b => 1, 0x9012 => 1, 0xa004 => 1, 0xa430 => 1,
50
- 0x13e => 1, 0x9101 => 1, 0xa005 => 1, 0xa431 => 1,
51
- 0x13f => 1, 0x9102 => 1, 0xa20b => 1, 0xa432 => 1,
52
- 0x201 => 1, 0x9201 => 1, 0xa20c => 1, 0xa433 => 1,
53
- 0x202 => 1, 0x9202 => 1, 0xa20e => 1, 0xa434 => 1,
54
- 0x211 => 1, 0x9203 => 1, 0xa20f => 1, 0xa435 => 1,
55
- 0x212 => 1, 0x9204 => 1, 0xa210 => 1,
56
- 0x213 => 1, 0x9205 => 1, 0xa214 => 1,
57
- 0x214 => 1, 0x9206 => 1, 0xa215 => 1,
29
+ 0x1 => 210,
30
+ 0x100 => 1, 0x8298 => 1, 0x9207 => 1, 0xa217 => 1,
31
+ 0x101 => 1, 0x829a => 1, 0x9208 => 1, 0xa300 => 1,
32
+ 0x102 => 1, 0x829d => 1, 0x9209 => 1, 0xa301 => 1,
33
+ 0x103 => 1, 0x8769 => 1, 0x920a => 1, 0xa302 => 1,
34
+ 0x106 => 1, 0x8822 => 1, 0x9214 => 220, 0xa401 => 220,
35
+ 0x10e => 1, 0x8824 => 1, 0x927c => 1, 0xa402 => 220,
36
+ 0x10f => 1, 0x8825 => 200, 0x9286 => 1, 0xa403 => 220,
37
+ 0x110 => 1, 0x8827 => 1, 0x9290 => 1, 0xa404 => 220,
38
+ 0x111 => 1, 0x8828 => 1, 0x9291 => 1, 0xa405 => 220,
39
+ 0x112 => 1, 0x8830 => 230, 0x9292 => 1, 0xa406 => 220,
40
+ 0x115 => 1, 0x8831 => 230, 0x9400 => 231, 0xa407 => 220,
41
+ 0x116 => 1, 0x8832 => 230, 0x9401 => 231, 0xa408 => 220,
42
+ 0x117 => 1, 0x8833 => 230, 0x9402 => 231, 0xa409 => 220,
43
+ 0x11a => 1, 0x8834 => 230, 0x9403 => 231, 0xa40a => 220,
44
+ 0x11b => 1, 0x8835 => 230, 0x9404 => 231, 0xa40b => 220,
45
+ 0x11c => 1, 0x9000 => 1, 0x9405 => 231, 0xa40c => 220,
46
+ 0x128 => 1, 0x9003 => 1, 0xa000 => 1, 0xa460 => 232,
47
+ 0x12d => 1, 0x9004 => 1, 0xa001 => 1, 0xa461 => 232,
48
+ 0x131 => 1, 0x9010 => 231, 0xa002 => 1, 0xa462 => 232,
49
+ 0x132 => 1, 0x9011 => 231, 0xa003 => 1, 0xa420 => 220,
50
+ 0x13b => 1, 0x9012 => 231, 0xa004 => 1, 0xa430 => 230,
51
+ 0x13e => 1, 0x9101 => 1, 0xa005 => 210, 0xa431 => 230,
52
+ 0x13f => 1, 0x9102 => 1, 0xa20b => 1, 0xa432 => 230,
53
+ 0x201 => 1, 0x9201 => 1, 0xa20c => 1, 0xa433 => 230,
54
+ 0x202 => 1, 0x9202 => 1, 0xa20e => 1, 0xa434 => 230,
55
+ 0x211 => 1, 0x9203 => 1, 0xa20f => 1, 0xa435 => 230,
56
+ 0x212 => 1, 0x9204 => 1, 0xa210 => 1, 0xa500 => 221,
57
+ 0x213 => 1, 0x9205 => 1, 0xa214 => 1,
58
+ 0x214 => 1, 0x9206 => 1, 0xa215 => 1,
59
+ );
60
+
61
+ # GPSVersionID numbers when each tag was introduced
62
+ my %gpsVer = (
63
+ 0x01 => 2000, 0x09 => 2000, 0x11 => 2000, 0x19 => 2000,
64
+ 0x02 => 2000, 0x0a => 2000, 0x12 => 2000, 0x1a => 2000,
65
+ 0x03 => 2000, 0x0b => 2000, 0x13 => 2000, 0x1b => 2200,
66
+ 0x04 => 2000, 0x0c => 2000, 0x14 => 2000, 0x1c => 2200,
67
+ 0x05 => 2000, 0x0d => 2000, 0x15 => 2000, 0x1d => 2200,
68
+ 0x06 => 2000, 0x0e => 2000, 0x16 => 2000, 0x1e => 2200,
69
+ 0x07 => 2000, 0x0f => 2000, 0x17 => 2000, 0x1f => 2300,
70
+ 0x08 => 2000, 0x10 => 2000, 0x18 => 2000,
71
+ );
72
+
73
+ # lookup to check version numbers
74
+ my %verCheck = (
75
+ ExifIFD => { ExifVersion => \%exifSpec },
76
+ InteropIFD => { ExifVersion => \%exifSpec },
77
+ GPS => { GPSVersionID => \%gpsVer },
58
78
  );
59
79
 
60
80
  # tags standard in various RAW file formats
@@ -177,13 +197,18 @@ my %validValue = (
177
197
  0x212 => undef, # YCbCrSubSampling
178
198
  },
179
199
  ExifIFD => {
180
- 0x9000 => 'defined $val', # ExifVersion
200
+ 0x9000 => 'defined $val and $val =~ /^\d{4}$/', # ExifVersion
181
201
  0x9101 => 'defined $val', # ComponentsConfiguration
182
202
  0xa000 => 'defined $val', # FlashpixVersion
183
203
  0xa001 => '$val == 1 or $val == 0xffff', # ColorSpace
184
204
  0xa002 => 'defined $val', # PixelXDimension
185
205
  0xa003 => 'defined $val', # PixelYDimension
186
206
  },
207
+ GPS => {
208
+ 0x00 => 'defined $val and $val =~ /^\d \d \d \d$/', # GPSVersionID
209
+ 0x1b => '$val =~ /^(GPS|CELLID|WLAN|MANUAL)$/', # GPSProcessingMethod
210
+ },
211
+ InteropIFD => { }, # (needed for ExifVersion check)
187
212
  },
188
213
  TIFF => {
189
214
  IFD0 => {
@@ -234,6 +259,10 @@ my %validValue = (
234
259
  InteropIFD => {
235
260
  0x0001 => undef, # InteropIndex
236
261
  },
262
+ GPS => {
263
+ 0x00 => 'defined $val and $val =~ /^\d \d \d \d$/', # GPSVersionID
264
+ 0x1b => '$val =~ /^(GPS|CELLID|WLAN|MANUAL)$/', # GPSProcessingMethod
265
+ },
237
266
  },
238
267
  );
239
268
 
@@ -506,6 +535,7 @@ sub ValidateOffsetInfo($$$;$)
506
535
  # Inputs: 0) ExifTool ref, 1) True to generate Validate tag
507
536
  sub FinishValidate($$)
508
537
  {
538
+ local $_;
509
539
  my ($et, $mkTag) = @_;
510
540
 
511
541
  my $fileType = $$et{FILE_TYPE} || '';
@@ -516,8 +546,14 @@ sub FinishValidate($$)
516
546
  local $SIG{'__WARN__'} = \&Image::ExifTool::SetWarning;
517
547
  foreach $grp (sort keys %{$validValue{$fileType}}) {
518
548
  next unless $$et{FOUND_DIR}{$grp};
549
+ my ($key, %val, %info, $minor, $verTag, $ver, $vstr);
550
+ my $verCheck = $verCheck{$grp};
551
+ if ($verCheck) {
552
+ ($verTag) = keys %$verCheck;
553
+ ($ver = $$et{VALUE}{$verTag}) =~ tr/0-9//dc; # (remove non-digits)
554
+ undef $ver unless $ver =~ /^\d{4}$/; # (already warned if invalid version)
555
+ }
519
556
  # get all tags in this group
520
- my ($key, %val, %info, $minor);
521
557
  foreach $key (keys %{$$et{VALUE}}) {
522
558
  next unless $et->GetGroup($key, 1) eq $grp;
523
559
  next if $$et{TAG_EXTRA}{$key} and $$et{TAG_EXTRA}{$key}{G3}; # ignore sub-documents
@@ -526,6 +562,16 @@ sub FinishValidate($$)
526
562
  $val{$tag} = $$et{VALUE}{$key};
527
563
  # save TagInfo ref for later
528
564
  $info{$tag} = $$et{TAG_INFO}{$key};
565
+ next unless defined $ver;
566
+ my $chk = $$verCheck{$verTag};
567
+ next if not defined $$chk{$tag} or $$chk{$tag} == 1 or $ver >= $$chk{$tag};
568
+ if ($verTag eq 'GPSVersionID') {
569
+ ($vstr = $$chk{$tag}) =~ s/^(\d)(\d)(\d)/$1.$2.$3./;
570
+ } else {
571
+ $vstr = sprintf('%.4d', $$chk{$tag});
572
+ }
573
+ $et->Warn(sprintf('%s tag 0x%.4x %s requires %s %s or higher',
574
+ $grp, $tag, $$et{TAG_INFO}{$key}{Name}, $verTag, $vstr));
529
575
  }
530
576
  # make quick lookup for values based on tag ID
531
577
  my $validValue = $validValue{$fileType}{$grp};