exiftool_vendored 11.99.0 → 12.11.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 +201 -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 +172 -99
  8. data/bin/lib/Image/ExifTool.pm +170 -117
  9. data/bin/lib/Image/ExifTool.pod +132 -97
  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 +202 -13
  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/ID3.pm +86 -12
  26. data/bin/lib/Image/ExifTool/IPTC.pm +1 -0
  27. data/bin/lib/Image/ExifTool/Import.pm +12 -9
  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 +1 -1
  32. data/bin/lib/Image/ExifTool/MPF.pm +2 -2
  33. data/bin/lib/Image/ExifTool/MacOS.pm +154 -38
  34. data/bin/lib/Image/ExifTool/Matroska.pm +3 -1
  35. data/bin/lib/Image/ExifTool/Minolta.pm +7 -2
  36. data/bin/lib/Image/ExifTool/Nikon.pm +143 -17
  37. data/bin/lib/Image/ExifTool/Olympus.pm +40 -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 +11 -3
  44. data/bin/lib/Image/ExifTool/Photoshop.pm +2 -1
  45. data/bin/lib/Image/ExifTool/QuickTime.pm +240 -37
  46. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +419 -60
  47. data/bin/lib/Image/ExifTool/README +25 -21
  48. data/bin/lib/Image/ExifTool/RSRC.pm +17 -11
  49. data/bin/lib/Image/ExifTool/Radiance.pm +7 -2
  50. data/bin/lib/Image/ExifTool/Ricoh.pm +19 -1
  51. data/bin/lib/Image/ExifTool/Shift.pl +1 -0
  52. data/bin/lib/Image/ExifTool/SigmaRaw.pm +40 -33
  53. data/bin/lib/Image/ExifTool/Sony.pm +423 -39
  54. data/bin/lib/Image/ExifTool/Stim.pm +2 -2
  55. data/bin/lib/Image/ExifTool/TagLookup.pm +5798 -5675
  56. data/bin/lib/Image/ExifTool/TagNames.pod +575 -100
  57. data/bin/lib/Image/ExifTool/Validate.pm +4 -4
  58. data/bin/lib/Image/ExifTool/WriteExif.pl +1 -0
  59. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +30 -21
  60. data/bin/lib/Image/ExifTool/Writer.pl +49 -24
  61. data/bin/lib/Image/ExifTool/XMP.pm +99 -17
  62. data/bin/lib/Image/ExifTool/XMP2.pl +1 -0
  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 +9 -8
@@ -19,7 +19,7 @@ use Image::ExifTool qw(:DataAccess);
19
19
  use Image::ExifTool::Canon;
20
20
  use Image::ExifTool::Exif;
21
21
 
22
- $VERSION = '1.56';
22
+ $VERSION = '1.57';
23
23
 
24
24
  sub ProcessCanonCustom($$$);
25
25
  sub ProcessCanonCustom2($$$);
@@ -1326,9 +1326,15 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
1326
1326
  2 => 'Enable (ISO speed)',
1327
1327
  },
1328
1328
  },
1329
- 0x0109 => {
1329
+ 0x0109 => [{ # (1DXmkIII)
1330
1330
  Name => 'UsableShootingModes',
1331
- Count => 2, # (Count is 1 for 1DXmkIII -- need to decode this)
1331
+ Condition => '$count == 1',
1332
+ Count => 1,
1333
+ PrintConv => 'sprintf("Flags 0x%x",$val)',
1334
+ PrintConvInv => '$val=~/0x([\dA-F]+)/i ? hex($1) : undef',
1335
+ },{
1336
+ Name => 'UsableShootingModes',
1337
+ Count => 2,
1332
1338
  PrintConv => [
1333
1339
  \%disableEnable,
1334
1340
  'sprintf("Flags 0x%x",$val)', # (M, Tv, Av, P, Bulb)
@@ -1337,10 +1343,16 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
1337
1343
  undef,
1338
1344
  '$val=~/0x([\dA-F]+)/i ? hex($1) : undef',
1339
1345
  ],
1340
- },
1341
- 0x010a => {
1346
+ }],
1347
+ 0x010a => [{ # (1DXmkIII)
1342
1348
  Name => 'UsableMeteringModes',
1343
- Count => 2, # (Count is 1 for 1DXmkIII -- need to decode this)
1349
+ Condition => '$count == 1',
1350
+ Count => 1,
1351
+ PrintConv => 'sprintf("Flags 0x%x",$val)',
1352
+ PrintConvInv => '$val=~/0x([\dA-F]+)/i ? hex($1) : undef',
1353
+ },{
1354
+ Name => 'UsableMeteringModes',
1355
+ Count => 2,
1344
1356
  PrintConv => [
1345
1357
  \%disableEnable,
1346
1358
  'sprintf("Flags 0x%x",$val)', # (evaluative,partial,spot,center-weighted average)
@@ -1349,7 +1361,7 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
1349
1361
  undef,
1350
1362
  '$val=~/0x([\dA-F]+)/i ? hex($1) : undef',
1351
1363
  ],
1352
- },
1364
+ }],
1353
1365
  0x010b => {
1354
1366
  Name => 'ExposureModeInManual',
1355
1367
  PrintConv => {
@@ -2066,7 +2078,27 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
2066
2078
  2 => 'Enable: Down with Set',
2067
2079
  },
2068
2080
  },
2069
- 0x0610 => {
2081
+ 0x0610 => [{ # (1DXmkIII)
2082
+ Name => 'ContinuousShootingSpeed',
2083
+ Condition => '$count == 6',
2084
+ Count => 6,
2085
+ PrintConv => [
2086
+ \%disableEnable,
2087
+ '"Hi $val"',
2088
+ '"Cont $val"',
2089
+ '"Lo $val"',
2090
+ '"Soft $val"',
2091
+ '"Soft LS $val"',
2092
+ ],
2093
+ PrintConvInv => [
2094
+ undef,
2095
+ '$val=~/(\d+)/ ? $1 : 0',
2096
+ '$val=~/(\d+)/ ? $1 : 0',
2097
+ '$val=~/(\d+)/ ? $1 : 0',
2098
+ '$val=~/(\d+)/ ? $1 : 0',
2099
+ '$val=~/(\d+)/ ? $1 : 0',
2100
+ ],
2101
+ },{ # others
2070
2102
  Name => 'ContinuousShootingSpeed',
2071
2103
  Count => 3,
2072
2104
  PrintConv => [
@@ -2079,7 +2111,7 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
2079
2111
  '$val=~/(\d+)/ ? $1 : 0',
2080
2112
  '$val=~/(\d+)/ ? $1 : 0',
2081
2113
  ],
2082
- },
2114
+ }],
2083
2115
  0x0611 => {
2084
2116
  Name => 'ContinuousShotLimit',
2085
2117
  Count => 2,
@@ -2092,9 +2124,15 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
2092
2124
  '$val=~/(\d+)/ ? $1 : 0',
2093
2125
  ],
2094
2126
  },
2095
- 0x0612 => { # (1DX)
2127
+ 0x0612 => [{ # (1DXmkIII)
2128
+ Name => 'RestrictDriveModes',
2129
+ Condition => '$count == 1',
2130
+ Count => 1,
2131
+ PrintConv => 'sprintf("Flags 0x%x",$val)',
2132
+ PrintConvInv => '$val=~/0x([\dA-F]+)/i ? hex($1) : undef',
2133
+ },{ # (1DX)
2096
2134
  Name => 'RestrictDriveModes',
2097
- Count => 2, # (Count is 1 for 1DXmkIII -- need to decode this)
2135
+ Count => 2,
2098
2136
  PrintConv => [
2099
2137
  \%disableEnable,
2100
2138
  'sprintf("Flags 0x%x",$val)', # (Single,Cont Hi,Cont Lo,Timer 10,Timer 2,Silent,Super Hi)
@@ -2103,7 +2141,7 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
2103
2141
  undef,
2104
2142
  '$val=~/0x([\dA-F]+)/i ? hex($1) : undef',
2105
2143
  ],
2106
- },
2144
+ }],
2107
2145
  #### 4a) Operation
2108
2146
  0x0701 => [
2109
2147
  {
@@ -2458,7 +2496,21 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
2458
2496
  },
2459
2497
  },
2460
2498
  ],
2461
- 0x080c => {
2499
+ 0x080c => [{ # (1DXmkIII)
2500
+ Name => 'TimerLength',
2501
+ Condition => '$count == 3',
2502
+ Count => 3,
2503
+ PrintConv => [
2504
+ '"6 s: $val"',
2505
+ '"16 s: $val"',
2506
+ '"After release: $val"',
2507
+ ],
2508
+ PrintConvInv => [
2509
+ '$val=~/(\d+)$/ ? $1 : 0',
2510
+ '$val=~/(\d+)$/ ? $1 : 0',
2511
+ '$val=~/(\d+)$/ ? $1 : 0',
2512
+ ],
2513
+ },{
2462
2514
  Name => 'TimerLength',
2463
2515
  Count => 4,
2464
2516
  PrintConv => [
@@ -2473,7 +2525,7 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
2473
2525
  '$val=~/(\d+)$/ ? $1 : 0',
2474
2526
  '$val=~/(\d+)$/ ? $1 : 0',
2475
2527
  ],
2476
- },
2528
+ }],
2477
2529
  0x080d => {
2478
2530
  Name => 'ShortReleaseTimeLag',
2479
2531
  PrintConv => \%disableEnable,
@@ -2520,6 +2572,8 @@ my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
2520
2572
  PrintConv => {
2521
2573
  0 => 'Cancel selected',
2522
2574
  1 => 'Erase selected',
2575
+ 2 => 'Erase RAW selected', # (1DXmkIII)
2576
+ 3 => 'Erase non-RAW selected', # (1DXmkIII)
2523
2577
  },
2524
2578
  },
2525
2579
  0x0814 => { # (5DS)
@@ -2595,7 +2649,7 @@ sub ProcessCanonCustom2($$$)
2595
2649
  my $recPos = $pos;
2596
2650
  my $recEnd = $pos + $recLen - 8;
2597
2651
  if ($recEnd > $end) {
2598
- $et->Warn('Corrupted CanonCustom2 group');
2652
+ $et->Warn("Corrupted CanonCustom2 group $recNum");
2599
2653
  return 0;
2600
2654
  }
2601
2655
  if ($verbose and not $write) {
@@ -2605,8 +2659,17 @@ sub ProcessCanonCustom2($$$)
2605
2659
  for ($i=0; $recPos + 8 < $recEnd; ++$i, $recPos+=4*$num) {
2606
2660
  $tag = Get32u($dataPt, $recPos);
2607
2661
  $num = Get32u($dataPt, $recPos + 4);
2662
+ my $nextRec = $recPos + 8 + $num * 4;
2663
+ last if $nextRec > $recEnd;
2664
+ # patch for EOS-1DXmkIII firmware 1.0.0 bug:
2665
+ if ($tag == 0x70c and $num == 0x66 and $nextRec + 8 < $recEnd) {
2666
+ my $tmp = Get32u($dataPt, $nextRec + 4);
2667
+ if ($tmp == 0x70f) {
2668
+ $et->Warn('Fixed incorrect CanonCustom tag 0x70c size', 1);
2669
+ ++$num; # (count should be one greater)
2670
+ }
2671
+ }
2608
2672
  $recPos += 8;
2609
- last if $recPos + $num * 4 > $recEnd;
2610
2673
  my $val = ReadValue($dataPt, $recPos, 'int32s', $num, $num * 4);
2611
2674
  if ($write) {
2612
2675
  # write new value
@@ -2638,6 +2701,9 @@ sub ProcessCanonCustom2($$$)
2638
2701
  }
2639
2702
  }
2640
2703
  }
2704
+ if ($i != $recCount) {
2705
+ $et->Warn('Missing '.($recCount-$i)." entries in CanonCustom2 group $recNum directory", 1);
2706
+ }
2641
2707
  $pos = $recEnd;
2642
2708
  }
2643
2709
  if ($pos != $end) {
@@ -6,6 +6,7 @@
6
6
  # Revisions: 2013-09-19 - P. Harvey created
7
7
  #
8
8
  # References: 1) http://www.cineon.com/ff_draft.php
9
+ # 2) Harry Mallon private communication
9
10
  #------------------------------------------------------------------------------
10
11
 
11
12
  package Image::ExifTool::DPX;
@@ -14,7 +15,7 @@ use strict;
14
15
  use vars qw($VERSION);
15
16
  use Image::ExifTool qw(:DataAccess :Utils);
16
17
 
17
- $VERSION = '1.03';
18
+ $VERSION = '1.04';
18
19
 
19
20
  # DPX tags
20
21
  %Image::ExifTool::DPX::Main = (
@@ -86,6 +87,56 @@ $VERSION = '1.03';
86
87
  156 => 'User-defined 8 component element',
87
88
  },
88
89
  },
90
+ 801 => { #2
91
+ Name => 'TransferCharacteristic',
92
+ Format => 'int8u',
93
+ PrintConv => {
94
+ 0 => 'User-defined',
95
+ 1 => 'Printing density',
96
+ 2 => 'Linear',
97
+ 3 => 'Logarithmic',
98
+ 4 => 'Unspecified video',
99
+ 5 => 'SMPTE 274M',
100
+ 6 => 'ITU-R 704-4',
101
+ 7 => 'ITU-R 601-5 system B or G (625)',
102
+ 8 => 'ITU-R 601-5 system M (525)',
103
+ 9 => 'Composite video (NTSC)',
104
+ 10 => 'Composite video (PAL)',
105
+ 11 => 'Z (depth) - linear',
106
+ 12 => 'Z (depth) - homogeneous',
107
+ 13 => 'SMPTE ADX',
108
+ 14 => 'ITU-R 2020 NCL',
109
+ 15 => 'ITU-R 2020 CL',
110
+ 16 => 'IEC 61966-2-4 xvYCC',
111
+ 17 => 'ITU-R 2100 NCL/PQ',
112
+ 18 => 'ITU-R 2100 ICtCp/PQ',
113
+ 19 => 'ITU-R 2100 NCL/HLG',
114
+ 20 => 'ITU-R 2100 ICtCp/HLG',
115
+ 21 => 'RP 431-2:2011 Gama 2.6',
116
+ 22 => 'IEC 61966-2-1 sRGB',
117
+ },
118
+ },
119
+ 802 => { #2
120
+ Name => 'ColorimetricSpecification',
121
+ Format => 'int8u',
122
+ PrintConv => {
123
+ 0 => 'User-defined',
124
+ 1 => 'Printing density',
125
+ 4 => 'Unspecified video',
126
+ 5 => 'SMPTE 274M',
127
+ 6 => 'ITU-R 704-4',
128
+ 7 => 'ITU-R 601-5 system B or G (625)',
129
+ 8 => 'ITU-R 601-5 system M (525)',
130
+ 9 => 'Composite video (NTSC)',
131
+ 10 => 'Composite video (PAL)',
132
+ 13 => 'SMPTE ADX',
133
+ 14 => 'ITU-R 2020',
134
+ 15 => 'P3D65',
135
+ 16 => 'P3DCI',
136
+ 17 => 'P3D60',
137
+ 18 => 'ACES',
138
+ },
139
+ },
89
140
  803 => { Name => 'BitDepth', Format => 'int8u' },
90
141
  820 => { Name => 'ImageDescription', Format => 'string[32]' },
91
142
  892 => { Name => 'Image2Description', Format => 'string[32]', RawConv => '$val=~/[^\xff]/ ? $val : undef' },
@@ -106,9 +157,12 @@ $VERSION = '1.03';
106
157
  1556=> { Name => 'InputDeviceName', Format => 'string[32]' },
107
158
  1588=> { Name => 'InputDeviceSerialNumber', Format => 'string[32]' },
108
159
  # 1620=> { Name => 'AspectRatio', Format => 'int32u' },
109
- 1724 => { Name => 'FrameRate', Format => 'float' },
160
+ 1724 => { Name => 'OriginalFrameRate',Format => 'float' },
161
+ 1728 => { Name => 'ShutterAngle', Format => 'float', RawConv => '$val =~ /\d/ ? $val : undef' }, #2
110
162
  1732 => { Name => 'FrameID', Format => 'string[32]' },
111
163
  1764 => { Name => 'SlateInformation', Format => 'string[100]' },
164
+ 1920 => { Name => 'TimeCode', Format => 'int32u' }, #2
165
+ 1940 => { Name => 'FrameRate', Format => 'float', RawConv => '$val =~ /\d/ ? $val : undef' }, #2
112
166
  1972 => { Name => 'Reserved5', Format => 'string[76]', Unknown => 1 },
113
167
  2048 => { Name => 'UserID', Format => 'string[32]' },
114
168
  );
@@ -15,7 +15,7 @@ use strict;
15
15
  use vars qw($VERSION);
16
16
  use Image::ExifTool::XMP;
17
17
 
18
- $VERSION = '1.02';
18
+ $VERSION = '1.05';
19
19
 
20
20
  my %dateTimeInfo = (
21
21
  # NOTE: Do NOT put "Groups" here because Groups hash must not be common!
@@ -28,7 +28,7 @@ my %dateTimeInfo = (
28
28
  my %materialSample = (
29
29
  STRUCT_NAME => 'DarwinCore MaterialSample',
30
30
  NAMESPACE => 'dwc',
31
- materialSampleID => { },
31
+ materialSampleID => { },
32
32
  );
33
33
 
34
34
  my %event = (
@@ -40,7 +40,26 @@ my %event = (
40
40
  eventDate => { %dateTimeInfo, Groups => { 2 => 'Time' } },
41
41
  eventID => { },
42
42
  eventRemarks => { Writable => 'lang-alt' },
43
- eventTime => { %dateTimeInfo, Groups => { 2 => 'Time' } },
43
+ eventTime => {
44
+ Groups => { 2 => 'Time' },
45
+ Writable => 'string', # (so we can format this ourself)
46
+ Shift => 'Time',
47
+ # (allow date/time or just time value)
48
+ ValueConv => 'Image::ExifTool::XMP::ConvertXMPDate($val)',
49
+ PrintConv => '$self->ConvertDateTime($val)',
50
+ ValueConvInv => 'Image::ExifTool::XMP::FormatXMPDate($val) or $val',
51
+ PrintConvInv => q{
52
+ my $v = $self->InverseDateTime($val,undef,1);
53
+ undef $Image::ExifTool::evalWarning;
54
+ return $v if $v;
55
+ # allow time-only values by adding dummy date (thanks Herb)
56
+ my $v = $self->InverseDateTime("2000:01:01 $val",undef,1);
57
+ undef $Image::ExifTool::evalWarning;
58
+ return $v if $v and $v =~ s/.* //; # strip off dummy date
59
+ $Image::ExifTool::evalWarning = 'Invalid date/time or time-only value (use HH:MM:SS[.ss][+/-HH:MM|Z])';
60
+ return undef;
61
+ },
62
+ },
44
63
  fieldNotes => { },
45
64
  fieldNumber => { },
46
65
  habitat => { },
@@ -21,7 +21,7 @@ use strict;
21
21
  use vars qw($VERSION);
22
22
  use Image::ExifTool qw(:DataAccess :Utils);
23
23
 
24
- $VERSION = '1.16';
24
+ $VERSION = '1.17';
25
25
 
26
26
  sub ProcessPEResources($$);
27
27
  sub ProcessPEVersion($$);
@@ -1009,7 +1009,7 @@ sub ProcessPEDict($$)
1009
1009
  my $raf = $$dirInfo{RAF};
1010
1010
  my $dataPt = $$dirInfo{DataPt};
1011
1011
  my $dirLen = length($$dataPt);
1012
- my ($pos, @sections, %dirInfo);
1012
+ my ($pos, @sections, %dirInfo, $rsrcFound);
1013
1013
 
1014
1014
  # loop through all sections
1015
1015
  for ($pos=0; $pos+40<=$dirLen; $pos+=40) {
@@ -1019,14 +1019,16 @@ sub ProcessPEDict($$)
1019
1019
  my $offset = Get32u($dataPt, $pos + 20);
1020
1020
  # remember the section offsets for the VirtualAddress lookup later
1021
1021
  push @sections, { Base => $offset, Size => $size, VirtualAddress => $va };
1022
- # save details of the first resource section
1022
+ # save details of the first resource section (or .text if .rsrc not found, ref forum11465)
1023
+ next unless ($name eq ".rsrc\0\0\0" and not $rsrcFound and defined($rsrcFound = 1)) or
1024
+ ($name eq ".text\0\0\0" and not %dirInfo);
1023
1025
  %dirInfo = (
1024
1026
  RAF => $raf,
1025
1027
  Base => $offset,
1026
1028
  DirStart => 0, # (relative to Base)
1027
1029
  DirLen => $size,
1028
1030
  Sections => \@sections,
1029
- ) if $name eq ".rsrc\0\0\0" and not %dirInfo;
1031
+ );
1030
1032
  }
1031
1033
  # process the first resource section
1032
1034
  ProcessPEResources($et, \%dirInfo) or return 0 if %dirInfo;
@@ -1144,7 +1146,8 @@ sub ProcessEXE($$)
1144
1146
  my $fileSize = ($cp - ($cblp ? 1 : 0)) * 512 + $cblp;
1145
1147
  #(patch to accommodate observed 64-bit files)
1146
1148
  #return 0 if $fileSize < 0x40 or $fileSize < $lfarlc;
1147
- return 0 if $fileSize < 0x40;
1149
+ #return 0 if $fileSize < 0x40; (changed to warning in ExifTool 12.08)
1150
+ $et->Warn('Invalid file size in DOS header') if $fileSize < 0x40;
1148
1151
  # read the Windows NE, PE or LE (virtual device driver) header
1149
1152
  #if ($lfarlc == 0x40 and $fileSize > $lfanew + 2 and ...
1150
1153
  if ($raf->Seek($lfanew, 0) and $raf->Read($buff, 0x40) and $buff =~ /^(NE|PE|LE)/) {
@@ -56,7 +56,7 @@ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat
56
56
  use Image::ExifTool qw(:DataAccess :Utils);
57
57
  use Image::ExifTool::MakerNotes;
58
58
 
59
- $VERSION = '4.30';
59
+ $VERSION = '4.31';
60
60
 
61
61
  sub ProcessExif($$$);
62
62
  sub WriteExif($$$);
@@ -4715,8 +4715,8 @@ my %subSecConv = (
4715
4715
  },
4716
4716
  LensID => {
4717
4717
  Groups => { 2 => 'Camera' },
4718
- Require => 'LensType',
4719
4718
  Desire => {
4719
+ 0 => 'LensType',
4720
4720
  1 => 'FocalLength',
4721
4721
  2 => 'MaxAperture',
4722
4722
  3 => 'MaxApertureValue',
@@ -4735,16 +4735,25 @@ my %subSecConv = (
4735
4735
  Applies only to LensType values with a lookup table. May be configured
4736
4736
  by adding user-defined lenses
4737
4737
  },
4738
- # this LensID is only valid if the LensType has a PrintConv or is a model name
4738
+ # this LensID is only valid if the LensType has a PrintConv,
4739
+ # or LensType or LensModel are the model name
4739
4740
  RawConv => q{
4740
4741
  my $printConv = $$self{TAG_INFO}{LensType}{PrintConv};
4741
- return $val if ref $printConv eq 'HASH' or (ref $printConv eq 'ARRAY' and
4742
- ref $$printConv[0] eq 'HASH') or $val[0] =~ /(mm|\d\/F)/;
4742
+ return $val if ref $printConv eq 'HASH' or
4743
+ (ref $printConv eq 'ARRAY' and ref $$printConv[0] eq 'HASH') or
4744
+ (defined $val[0] and $val[0] =~ /(mm|\d\/F)/) or
4745
+ (defined $val[6] and $val[6] =~ /(mm|\d\/F)/);
4743
4746
  return undef;
4744
4747
  },
4745
- ValueConv => '$val',
4748
+ ValueConv => '$val[0] || $val[6]',
4746
4749
  PrintConv => q{
4747
4750
  my $pcv;
4751
+ # use LensModel ([6]) if LensType ([0]) is not populated
4752
+ # (iPhone populates LensModel but not LensType)
4753
+ if (not defined $val[0] and defined $val[6]) {
4754
+ $val[0] = $val[6];
4755
+ $prt[0] = $prt[6];
4756
+ }
4748
4757
  # use LensType2 instead of LensType if available and valid (Sony E-mount lenses)
4749
4758
  # (0x8000 or greater; 0 for several older/3rd-party E-mount lenses)
4750
4759
  if (defined $val[9] and ($val[9] & 0x8000 or $val[9] == 0)) {
@@ -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