exiftool_vendored 13.30.0 → 13.33.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.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +57 -1
  3. data/bin/MANIFEST +5 -0
  4. data/bin/META.json +4 -3
  5. data/bin/META.yml +3 -2
  6. data/bin/README +47 -46
  7. data/bin/exiftool +88 -60
  8. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +7 -5
  9. data/bin/lib/Image/ExifTool/Canon.pm +16 -5
  10. data/bin/lib/Image/ExifTool/Exif.pm +7 -4
  11. data/bin/lib/Image/ExifTool/FlashPix.pm +4 -159
  12. data/bin/lib/Image/ExifTool/FujiFilm.pm +13 -3
  13. data/bin/lib/Image/ExifTool/Geotag.pm +5 -3
  14. data/bin/lib/Image/ExifTool/GoPro.pm +23 -4
  15. data/bin/lib/Image/ExifTool/LNK.pm +24 -3
  16. data/bin/lib/Image/ExifTool/Lang/cs.pm +0 -1
  17. data/bin/lib/Image/ExifTool/Lang/de.pm +2 -2
  18. data/bin/lib/Image/ExifTool/Lang/fr.pm +2 -2
  19. data/bin/lib/Image/ExifTool/Lang/it.pm +0 -1
  20. data/bin/lib/Image/ExifTool/Lang/ja.pm +0 -1
  21. data/bin/lib/Image/ExifTool/Lang/nl.pm +0 -1
  22. data/bin/lib/Image/ExifTool/Lang/pl.pm +0 -1
  23. data/bin/lib/Image/ExifTool/Lang/zh_cn.pm +0 -1
  24. data/bin/lib/Image/ExifTool/LigoGPS.pm +14 -6
  25. data/bin/lib/Image/ExifTool/Microsoft.pm +158 -1
  26. data/bin/lib/Image/ExifTool/Minolta.pm +1 -1
  27. data/bin/lib/Image/ExifTool/Nikon.pm +80 -39
  28. data/bin/lib/Image/ExifTool/NikonCustom.pm +40 -10
  29. data/bin/lib/Image/ExifTool/Olympus.pm +240 -35
  30. data/bin/lib/Image/ExifTool/PDF.pm +1 -0
  31. data/bin/lib/Image/ExifTool/Panasonic.pm +4 -4
  32. data/bin/lib/Image/ExifTool/Parrot.pm +1 -1
  33. data/bin/lib/Image/ExifTool/Pentax.pm +276 -56
  34. data/bin/lib/Image/ExifTool/Plot.pm +2 -3
  35. data/bin/lib/Image/ExifTool/QuickTime.pm +13 -5
  36. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +41 -17
  37. data/bin/lib/Image/ExifTool/Sigma.pm +19 -1
  38. data/bin/lib/Image/ExifTool/Sony.pm +5 -2
  39. data/bin/lib/Image/ExifTool/TNEF.pm +487 -0
  40. data/bin/lib/Image/ExifTool/TagLookup.pm +4374 -4262
  41. data/bin/lib/Image/ExifTool/TagNames.pod +259 -22
  42. data/bin/lib/Image/ExifTool/WriteExif.pl +14 -12
  43. data/bin/lib/Image/ExifTool/WritePDF.pl +1 -0
  44. data/bin/lib/Image/ExifTool/Writer.pl +142 -139
  45. data/bin/lib/Image/ExifTool/XMPStruct.pl +1 -1
  46. data/bin/lib/Image/ExifTool.pm +16 -7
  47. data/bin/lib/Image/ExifTool.pod +45 -44
  48. data/bin/perl-Image-ExifTool.spec +46 -45
  49. data/lib/exiftool_vendored/version.rb +1 -1
  50. metadata +3 -2
@@ -46,6 +46,7 @@
46
46
  # IB) Iliah Borg private communication (LibRaw)
47
47
  # JD) Jens Duttke private communication
48
48
  # NJ) Niels Kristian Bech Jensen private communication
49
+ # KG) Karsten Gieselmann private communication
49
50
  #
50
51
  # Notes: See POD documentation at the bottom of this file
51
52
  #------------------------------------------------------------------------------
@@ -58,11 +59,14 @@ use Image::ExifTool::Exif;
58
59
  use Image::ExifTool::GPS;
59
60
  use Image::ExifTool::HP;
60
61
 
61
- $VERSION = '3.51';
62
+ $VERSION = '3.54';
62
63
 
63
64
  sub CryptShutterCount($$);
64
65
  sub PrintFilter($$$);
65
66
  sub DecodeAFPoints($$$$;$);
67
+ sub AFPointNamesK3III($$;$);
68
+ sub AFPointValuesK3III($$);
69
+ sub AFAreasK3III($$);
66
70
 
67
71
  # pentax lens type codes (ref 4)
68
72
  # The first number gives the lens series, and the 2nd gives the model number
@@ -747,6 +751,11 @@ my @k3iiiAF = qw(
747
751
  C1 E1 G1 I1 K1 C3 E3 G3 I3 K3 C5 E5 G5
748
752
  I5 K5 C7 E7 G7 I7 K7 C9 E9 G9 I9 K9 A5 M5 B3
749
753
  L3 B5 L5 B7 L7 B1 L1 B9 L9 A3 M3 A7 M7
754
+ D1 F1 H1 J1 D3 F3 H3 J3 D5 F5 H5 J5 D7
755
+ F7 H7 J7 D9 F9 H9 J9 C2 E2 G2 I2 K2 C4
756
+ E4 G4 I4 K4 C6 E6 G6 I6 K6 C8 E8 G8 I8
757
+ K8 B2 L2 B4 L4 B6 L6 B8 L8 A1 M1 A2 M2
758
+ A4 M4 A6 M6 A8 M8 A9 M9
750
759
  );
751
760
 
752
761
  # decoding for Pentax Firmware ID tags - PH
@@ -1148,31 +1157,38 @@ my %binaryDataAttrs = (
1148
1157
  Notes => 'Pentax models',
1149
1158
  Writable => 'int16u',
1150
1159
  PrintConvColumns => 2,
1160
+ PrintHex => 1,
1151
1161
  PrintConv => { #PH
1152
- 0 => 'Normal',
1153
- 1 => 'Macro',
1154
- 2 => 'Infinity',
1155
- 3 => 'Manual',
1156
- 4 => 'Super Macro', #JD
1157
- 5 => 'Pan Focus',
1158
- 6 => 'Auto-area', # (GR III)
1159
- 8 => 'Select', # (GR III)
1160
- 9 => 'Pinpoint', # (GR III)
1161
- 10 => 'Tracking', # (GR III)
1162
- 11 => 'Continuous', # (GR III)
1163
- 12 => 'Snap', # (GR III)
1164
- 16 => 'AF-S (Focus-priority)', #17
1165
- 17 => 'AF-C (Focus-priority)', #17
1166
- 18 => 'AF-A (Focus-priority)', #PH (educated guess)
1167
- 32 => 'Contrast-detect (Focus-priority)', #PH (K-5)
1168
- 33 => 'Tracking Contrast-detect (Focus-priority)', #PH (K-5)
1162
+ 0x00 => 'Normal',
1163
+ 0x01 => 'Macro',
1164
+ 0x02 => 'Infinity',
1165
+ 0x03 => 'Manual',
1166
+ 0x04 => 'Super Macro', #JD
1167
+ 0x05 => 'Pan Focus',
1168
+ 0x06 => 'Auto-area', # (GR III)
1169
+ 0x07 => 'Zone Select', # (GR III)
1170
+ 0x08 => 'Select', # (GR III)
1171
+ 0x09 => 'Pinpoint', # (GR III)
1172
+ 0x0a => 'Tracking', # (GR III)
1173
+ 0x0b => 'Continuous', # (GR III)
1174
+ 0x0c => 'Snap', # (GR III)
1175
+ 0x10 => 'AF-S (Focus-priority)', #17
1176
+ 0x11 => 'AF-C (Focus-priority)', #17
1177
+ 0x12 => 'AF-A (Focus-priority)', #PH (educated guess)
1178
+ 0x20 => 'Contrast-detect (Focus-priority)', #PH (K-5)
1179
+ 0x21 => 'Tracking Contrast-detect (Focus-priority)', #PH (K-5)
1169
1180
  # bit 8 indicates release priority
1170
- 272 => 'AF-S (Release-priority)', #PH (K-5,K-3)
1171
- 273 => 'AF-C (Release-priority)', #PH (K-5,K-3)
1172
- 274 => 'AF-A (Release-priority)', #PH (K-3)
1173
- 288 => 'Contrast-detect (Release-priority)', #PH (K-01)
1174
- # 32777 (0x8009) - seen for Ricoh GR III
1175
- # 32779 (0x800b) - seen for Ricoh GR III
1181
+ 0x110 => 'AF-S (Release-priority)', #PH (K-5,K-3)
1182
+ 0x111 => 'AF-C (Release-priority)', #PH (K-5,K-3)
1183
+ 0x112 => 'AF-A (Release-priority)', #PH (K-3)
1184
+ 0x120 => 'Contrast-detect (Release-priority)', #PH (K-01)
1185
+ # bit 15 indicates macro mode (disabled for MF, and defaults to Select for Snap, Infinity)
1186
+ 0x8006 => 'Auto-area (Macro)', # (GR III)
1187
+ 0x8007 => 'Zone Select (Macro)', # (GR III)
1188
+ 0x8008 => 'Select (Macro)', # (GR III)
1189
+ 0x8009 => 'Pinpoint (Macro)', # (GR III)
1190
+ 0x800a => 'Tracking (Macro)', # (GR III)
1191
+ 0x800b => 'Continuous (Macro)', # (GR III)
1176
1192
  },
1177
1193
  },{
1178
1194
  Name => 'FocusMode',
@@ -1188,7 +1204,7 @@ my %binaryDataAttrs = (
1188
1204
  ],
1189
1205
  0x000e => [{ #29
1190
1206
  Name => 'AFPointSelected',
1191
- Condition => '$$self{Model} =~ /K-1\b/',
1207
+ Condition => '$$self{Model} =~ /(K-1|645Z)\b/', # (NC for 645Z)
1192
1208
  Writable => 'int16u',
1193
1209
  Notes => 'K-1',
1194
1210
  PrintConvColumns => 2,
@@ -1354,6 +1370,7 @@ my %binaryDataAttrs = (
1354
1370
  0xfffd => 'Automatic Tracking AF', #JD
1355
1371
  0xfffc => 'Face Detect AF', #JD
1356
1372
  0xfffb => 'AF Select', #PH (Q select from 25-areas)
1373
+ 0xfffa => 'Auto 2', #KarstenGieselmann
1357
1374
  0 => 'None', #PH (Q in manual focus mode)
1358
1375
  1 => 'Upper-left',
1359
1376
  2 => 'Top',
@@ -1366,16 +1383,20 @@ my %binaryDataAttrs = (
1366
1383
  9 => 'Lower-left',
1367
1384
  10 => 'Bottom',
1368
1385
  11 => 'Lower-right',
1369
- },
1386
+ },{
1370
1387
  # (second number exists for K-5II(s) is usually 0, but is 1 for AF.C with
1371
1388
  # AFPointMode=='Select' and extended tracking focus points are enabled in the settings)
1372
- ],
1389
+ # -----
1390
+ #KG: for K-70 and older models with 11 PDAF points (K-S2, K-S1, K-50, K-500, K-30, K-5II(s) )
1391
+ 0 => 'Single Point', # Select AF (1-point) in both PDAF and CAF modes
1392
+ 1 => 'Expanded Area', # Expanded Area AF in AF-C
1393
+ }],
1373
1394
  }],
1374
1395
  0x000f => [{ #PH
1375
1396
  Name => 'AFPointsInFocus',
1376
- Condition => '$$self{Model} =~ /K-3\b/',
1397
+ Condition => '$$self{Model} =~ /K-(3|S1|S2)\b/', #KG: valid also for K-S1/S2
1377
1398
  Writable => 'int32u',
1378
- Notes => 'K-3 only',
1399
+ Notes => 'K-3, K-S1 and K-S2 only',
1379
1400
  PrintHex => 1,
1380
1401
  PrintConv => {
1381
1402
  0 => '(none)',
@@ -2168,7 +2189,7 @@ my %binaryDataAttrs = (
2168
2189
  11 => 'Flat', #31 (K-70)
2169
2190
  # the following values from GR III
2170
2191
  256 => 'Standard',
2171
- 257 => 'Vivid',
2192
+ 257 => 'Vivid',
2172
2193
  258 => 'Monotone',
2173
2194
  259 => 'Soft Monotone',
2174
2195
  260 => 'Hard Monotone',
@@ -3096,13 +3117,20 @@ my %binaryDataAttrs = (
3096
3117
  # 0x0406 - undef[4116] (K-5)
3097
3118
  # 0x0407 - undef[3072] (Q DNG)
3098
3119
  # 0x0408 - undef[1024] (Q DNG)
3120
+ 0x040b => {
3121
+ Name => 'FaceInfoK3III',
3122
+ # undef[1640] (actually int32u[410], K3III)
3123
+ SubDirectory => { TagTable => 'Image::ExifTool::Pentax::FaceInfoK3III' },
3124
+ },
3125
+ 0x040c => {
3126
+ Name => 'AFInfoK3III',
3127
+ SubDirectory => { TagTable => 'Image::ExifTool::Pentax::AFInfoK3III' },
3128
+ },
3099
3129
  0x0e00 => {
3100
3130
  Name => 'PrintIM',
3101
3131
  Description => 'Print Image Matching',
3102
3132
  Writable => 0,
3103
- SubDirectory => {
3104
- TagTable => 'Image::ExifTool::PrintIM::Main',
3105
- },
3133
+ SubDirectory => { TagTable => 'Image::ExifTool::PrintIM::Main' },
3106
3134
  },
3107
3135
  );
3108
3136
 
@@ -5005,11 +5033,11 @@ my %binaryDataAttrs = (
5005
5033
  # 0x0a - values: 00,05,0d,15,86,8e,a6,ae
5006
5034
  0x0b => { #JD
5007
5035
  Name => 'AFPointsInFocus',
5008
- Condition => '$$self{Model} !~ /(K-(1|3|70)|KP)\b/',
5036
+ Condition => '$$self{Model} !~ /(K-(1|3|70|S1|S2)|KP)\b/', #KG: valid also for K-S1/S2
5009
5037
  Notes => q{
5010
- models other than the K-1, K-3, K-70 and KP. May report two points in focus
5011
- even though a single AFPoint has been selected, in which case the selected
5012
- AFPoint is the first reported
5038
+ models other than the K-1, K-3, K-70, KP and K-S1/S2. May report two points
5039
+ in focus even though a single AFPoint has been selected, in which case the
5040
+ selected AFPoint is the first reported
5013
5041
  },
5014
5042
  PrintConvColumns => 2,
5015
5043
  PrintConv => {
@@ -5042,34 +5070,37 @@ my %binaryDataAttrs = (
5042
5070
  Format => 'int16uRev[69]',
5043
5071
  Unknown => 1,
5044
5072
  Notes => 'some unknown values related to each AFPoint',
5045
- # order is the same as AFPoints below, but there is an additional value for
5073
+ # order is the same as AFPointsSelected below, but there is an additional value for
5046
5074
  # each AF point starting at offset 28 in the array (yes, the range overlaps
5047
5075
  # with the 1st values)
5048
5076
  # (values are int16s stored in reversed byte order)
5049
5077
  ValueConv => 'my @a=split " ",$val;$_>32767 and $_-=65536 foreach @a;join " ",@a',
5050
- PrintConv => \&AFPointValues,
5078
+ PrintConv => \&AFPointValuesK3III,
5051
5079
  },
5052
- 0x12a => { # byte has a value of 2 if corresponding AF point is selected
5053
- Name => 'AFPointsSelected',
5080
+ 0x12a => {
5081
+ Name => 'AFPointsSelected', # (should probably be "AFPointSelected", but the bitmask allows multiple points)
5054
5082
  Condition => '$$self{Model} eq "PENTAX K-3 Mark III"', # any other models?
5055
5083
  Notes => q{
5056
5084
  K-3III only. 41 selectable AF points from a total of 101 available in a 13x9
5057
- grid. Columns are labelled A-M and rows are 1-9. The center point is G5
5085
+ grid. Columns are labelled A-M and rows are 1-9. The center point is G5. The
5086
+ exact meaning of this tag is not fully understood, although it does seem
5087
+ related to the selected AF point
5058
5088
  },
5059
- Format => 'int8u[41]',
5060
- PrintConv => 'Image::ExifTool::Pentax::AFPointsK3iii($val,$self,2)',
5089
+ Format => 'int8u[101]',
5090
+ # value of 1 means "selected point", and 2 means "center of selected area"
5091
+ PrintConv => \&AFPointNamesK3III,
5061
5092
  },
5062
5093
  #
5063
5094
  # (maybe not coincidentally, there are 60 unknown bytes
5064
5095
  # here, and there are also 60 non-selectable AF points)
5065
5096
  #
5066
5097
  0x18f => { # byte has a value of 1 if corresponding AF point is ... in focus maybe?
5067
- # usually the same points as AFPoints above, but not always
5098
+ # usually the same points as AFPointsSelected above, but not always
5068
5099
  Name => 'AFPointsUnknown',
5069
5100
  Condition => '$$self{Model} eq "PENTAX K-3 Mark III"', # any other models?
5070
5101
  Unknown => 1,
5071
- Format => 'int8u[41]',
5072
- PrintConv => \&AFPointsK3iii,
5102
+ Format => 'int8u[101]',
5103
+ PrintConv => \&AFPointNamesK3III,
5073
5104
  },
5074
5105
  0x1fa => {
5075
5106
  Name => 'LiveView',
@@ -5096,7 +5127,7 @@ my %binaryDataAttrs = (
5096
5127
  Name => 'NumCAFPoints',
5097
5128
  RawConv => '$$self{NumCAFPoints} = ($val & 0x0f) * ($val >> 4); $val',
5098
5129
  ValueConv => '($val >> 4) * ($val & 0x0f)',
5099
- },
5130
+ },
5100
5131
  1.1 => {
5101
5132
  Name => 'CAFGridSize',
5102
5133
  ValueConv => '($val >> 4) . " " . ($val & 0x0f)', # (width x height)
@@ -5686,6 +5717,175 @@ my %binaryDataAttrs = (
5686
5717
  ValueConvInv => '-$val * 2',
5687
5718
  },
5688
5719
  );
5720
+
5721
+ %Image::ExifTool::Pentax::FaceInfoK3III = (
5722
+ %binaryDataAttrs,
5723
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
5724
+ FORMAT => 'int32u',
5725
+ DATAMEMBER => [ 6, 8 ],
5726
+ 0.1 => {
5727
+ Name => 'FaceInfoK3III',
5728
+ Format => 'int32u[$size/4]',
5729
+ Notes => q{
5730
+ entire FaceInfoK3III structure. Provides access to raw numerical values and
5731
+ facilitates the writing of the whole structure
5732
+ },
5733
+ Unknown => 1,
5734
+ },
5735
+ 0 => { Name => 'FaceImageSize', Format => 'int32u[2]' },
5736
+ 2 => { Name => 'CAFArea', Format => 'int32u[4]', Notes => 'top, left, width, height' },
5737
+ 6 => { Name => 'FacesDetectedA', RawConv => '$$self{FacesA} = $val' },
5738
+ 8 => { Name => 'FacesDetectedB', RawConv => '$$self{FacesA} = $val' },
5739
+ 10 => { Name => 'Face1AArea', Condition => '$$self{FacesA} >= 1', Format => 'int32u[4]' },
5740
+ 14 => { Name => 'Face1AEye1', Condition => '$$self{FacesA} >= 1', Format => 'int32u[4]' },
5741
+ 18 => { Name => 'Face1AEye2', Condition => '$$self{FacesA} >= 1', Format => 'int32u[4]' },
5742
+ 30 => { Name => 'Face2AArea', Condition => '$$self{FacesA} >= 2', Format => 'int32u[4]' },
5743
+ 34 => { Name => 'Face2AEye1', Condition => '$$self{FacesA} >= 2', Format => 'int32u[4]' },
5744
+ 38 => { Name => 'Face2AEye2', Condition => '$$self{FacesA} >= 2', Format => 'int32u[4]' },
5745
+ 50 => { Name => 'Face3AArea', Condition => '$$self{FacesA} >= 3', Format => 'int32u[4]' },
5746
+ 54 => { Name => 'Face3AEye1', Condition => '$$self{FacesA} >= 3', Format => 'int32u[4]' },
5747
+ 58 => { Name => 'Face3AEye2', Condition => '$$self{FacesA} >= 3', Format => 'int32u[4]' },
5748
+ 70 => { Name => 'Face4AArea', Condition => '$$self{FacesA} >= 4', Format => 'int32u[4]' },
5749
+ 74 => { Name => 'Face4AEye1', Condition => '$$self{FacesA} >= 4', Format => 'int32u[4]' },
5750
+ 78 => { Name => 'Face4AEye2', Condition => '$$self{FacesA} >= 4', Format => 'int32u[4]' },
5751
+ 90 => { Name => 'Face5AArea', Condition => '$$self{FacesA} >= 5', Format => 'int32u[4]' },
5752
+ 94 => { Name => 'Face5AEye1', Condition => '$$self{FacesA} >= 5', Format => 'int32u[4]' },
5753
+ 98 => { Name => 'Face5AEye2', Condition => '$$self{FacesA} >= 5', Format => 'int32u[4]' },
5754
+ 110 => { Name => 'Face6AArea', Condition => '$$self{FacesA} >= 6', Format => 'int32u[4]' },
5755
+ 114 => { Name => 'Face6AEye1', Condition => '$$self{FacesA} >= 6', Format => 'int32u[4]' },
5756
+ 118 => { Name => 'Face6AEye2', Condition => '$$self{FacesA} >= 6', Format => 'int32u[4]' },
5757
+ 130 => { Name => 'Face7AArea', Condition => '$$self{FacesA} >= 7', Format => 'int32u[4]' },
5758
+ 134 => { Name => 'Face7AEye1', Condition => '$$self{FacesA} >= 7', Format => 'int32u[4]' },
5759
+ 138 => { Name => 'Face7AEye2', Condition => '$$self{FacesA} >= 7', Format => 'int32u[4]' },
5760
+ 150 => { Name => 'Face8AArea', Condition => '$$self{FacesA} >= 8', Format => 'int32u[4]' },
5761
+ 154 => { Name => 'Face8AEye1', Condition => '$$self{FacesA} >= 8', Format => 'int32u[4]' },
5762
+ 158 => { Name => 'Face8AEye2', Condition => '$$self{FacesA} >= 8', Format => 'int32u[4]' },
5763
+ 170 => { Name => 'Face9AArea', Condition => '$$self{FacesA} >= 9', Format => 'int32u[4]' },
5764
+ 174 => { Name => 'Face9AEye1', Condition => '$$self{FacesA} >= 9', Format => 'int32u[4]' },
5765
+ 178 => { Name => 'Face9AEye2', Condition => '$$self{FacesA} >= 9', Format => 'int32u[4]' },
5766
+ 190 => { Name => 'Face10AArea',Condition => '$$self{FacesA} >= 10', Format => 'int32u[4]' },
5767
+ 194 => { Name => 'Face10AEye1',Condition => '$$self{FacesA} >= 10', Format => 'int32u[4]' },
5768
+ 198 => { Name => 'Face10AEye2',Condition => '$$self{FacesA} >= 10', Format => 'int32u[4]' },
5769
+ 210 => { Name => 'Face1BArea', Condition => '$$self{FacesA} >= 1', Format => 'int32u[4]' },
5770
+ 214 => { Name => 'Face1BEye1', Condition => '$$self{FacesA} >= 1', Format => 'int32u[4]' },
5771
+ 218 => { Name => 'Face1BEye2', Condition => '$$self{FacesA} >= 1', Format => 'int32u[4]' },
5772
+ 230 => { Name => 'Face2BArea', Condition => '$$self{FacesA} >= 2', Format => 'int32u[4]' },
5773
+ 234 => { Name => 'Face2BEye1', Condition => '$$self{FacesA} >= 2', Format => 'int32u[4]' },
5774
+ 238 => { Name => 'Face2BEye2', Condition => '$$self{FacesA} >= 2', Format => 'int32u[4]' },
5775
+ 250 => { Name => 'Face3BArea', Condition => '$$self{FacesA} >= 3', Format => 'int32u[4]' },
5776
+ 254 => { Name => 'Face3BEye1', Condition => '$$self{FacesA} >= 3', Format => 'int32u[4]' },
5777
+ 258 => { Name => 'Face3BEye2', Condition => '$$self{FacesA} >= 3', Format => 'int32u[4]' },
5778
+ 270 => { Name => 'Face4BArea', Condition => '$$self{FacesA} >= 4', Format => 'int32u[4]' },
5779
+ 274 => { Name => 'Face4BEye1', Condition => '$$self{FacesA} >= 4', Format => 'int32u[4]' },
5780
+ 278 => { Name => 'Face4BEye2', Condition => '$$self{FacesA} >= 4', Format => 'int32u[4]' },
5781
+ 290 => { Name => 'Face5BArea', Condition => '$$self{FacesA} >= 5', Format => 'int32u[4]' },
5782
+ 294 => { Name => 'Face5BEye1', Condition => '$$self{FacesA} >= 5', Format => 'int32u[4]' },
5783
+ 298 => { Name => 'Face5BEye2', Condition => '$$self{FacesA} >= 5', Format => 'int32u[4]' },
5784
+ 310 => { Name => 'Face6BArea', Condition => '$$self{FacesA} >= 6', Format => 'int32u[4]' },
5785
+ 314 => { Name => 'Face6BEye1', Condition => '$$self{FacesA} >= 6', Format => 'int32u[4]' },
5786
+ 318 => { Name => 'Face6BEye2', Condition => '$$self{FacesA} >= 6', Format => 'int32u[4]' },
5787
+ 330 => { Name => 'Face7BArea', Condition => '$$self{FacesA} >= 7', Format => 'int32u[4]' },
5788
+ 334 => { Name => 'Face7BEye1', Condition => '$$self{FacesA} >= 7', Format => 'int32u[4]' },
5789
+ 338 => { Name => 'Face7BEye2', Condition => '$$self{FacesA} >= 7', Format => 'int32u[4]' },
5790
+ 350 => { Name => 'Face8BArea', Condition => '$$self{FacesA} >= 8', Format => 'int32u[4]' },
5791
+ 354 => { Name => 'Face8BEye1', Condition => '$$self{FacesA} >= 8', Format => 'int32u[4]' },
5792
+ 358 => { Name => 'Face8BEye2', Condition => '$$self{FacesA} >= 8', Format => 'int32u[4]' },
5793
+ 370 => { Name => 'Face9BArea', Condition => '$$self{FacesA} >= 9', Format => 'int32u[4]' },
5794
+ 374 => { Name => 'Face9BEye1', Condition => '$$self{FacesA} >= 9', Format => 'int32u[4]' },
5795
+ 378 => { Name => 'Face9BEye2', Condition => '$$self{FacesA} >= 9', Format => 'int32u[4]' },
5796
+ 390 => { Name => 'Face10BArea',Condition => '$$self{FacesA} >= 10', Format => 'int32u[4]' },
5797
+ 394 => { Name => 'Face10BEye1',Condition => '$$self{FacesA} >= 10', Format => 'int32u[4]' },
5798
+ 398 => { Name => 'Face10BEye2',Condition => '$$self{FacesA} >= 10', Format => 'int32u[4]' },
5799
+ );
5800
+
5801
+ %Image::ExifTool::Pentax::AFInfoK3III = (
5802
+ %binaryDataAttrs,
5803
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
5804
+ FORMAT => 'int16u',
5805
+ DATAMEMBER => [ 3 ],
5806
+ NOTES => 'AF tags written by the K-3 Mark III, GR III and GR IIIx.',
5807
+ 0 => {
5808
+ Name => 'AFInfo',
5809
+ Format => 'int16u[$size/2]',
5810
+ Notes => q{
5811
+ entire AFInfoK3III structure. Provides access to raw numerical values and
5812
+ facilitates the writing of the whole structure
5813
+ },
5814
+ Unknown => 1,
5815
+ },
5816
+ 0.1 => {
5817
+ Name => 'AFMode',
5818
+ PrintConv => {
5819
+ 0 => 'Phase Detect',
5820
+ 2 => 'Contrast Detect',
5821
+ 255 => 'Manual Focus',
5822
+ },
5823
+ },
5824
+ 1 => {
5825
+ Name => 'AFSelectionMode',
5826
+ PrintHex => 1,
5827
+ PrintConv => {
5828
+ 0 => 'Manual Focus',
5829
+ 1 => 'Spot',
5830
+ 2 => 'Select (5-points)',
5831
+ 3 => 'Expanded Area (S)',
5832
+ 4 => 'Expanded Area (M)',
5833
+ 5 => 'Expanded Area (L)',
5834
+ 6 => 'Select (S)',
5835
+ 7 => 'Zone Select (21-point)',
5836
+ 8 => 'Select XS',
5837
+ 0xff => 'Auto Area',
5838
+ # Contrast-detect modes
5839
+ 0x2001 => 'Contrast-detect Auto Area',
5840
+ 0x2002 => 'Contrast-detect Select', # (GR III)
5841
+ 0x2003 => 'Pinpoint', # (GR III)
5842
+ 0x2004 => 'Tracking',
5843
+ 0x2005 => 'Continuous', # (GR III)
5844
+ 0x2006 => 'Face Detection',
5845
+ 0x2007 => 'Contrast-detect Select (S)',
5846
+ 0x2008 => 'Contrast-detect Select (M)',
5847
+ 0x2009 => 'Contrast-detect Select (L)',
5848
+ 0x200a => 'Contrast-detect Zone Select', # (GR III)
5849
+ 0x200b => 'Contrast-detect Spot',
5850
+ },
5851
+ },
5852
+ 3 => {
5853
+ Name => 'NumAFPoints',
5854
+ RawConv => '$$self{NumAFPoints} = $val',
5855
+ },
5856
+ # the data for each AF point consists of 7 int16u values:
5857
+ # the frame width/height, the X/Y position of the focus area,
5858
+ # width/height of the focus area (0/0 for phase-detect modes),
5859
+ # followed by a flags word
5860
+ 7 => { # (the same for all areas in my samples, so only extract the first)
5861
+ Name => 'AFFrameSize',
5862
+ Condition => '$$self{NumAFPoints} > 0',
5863
+ Format => 'int16u[2]',
5864
+ Writable => 0,
5865
+ PrintConv => '$val=~s/ /x/; $val',
5866
+ },
5867
+ 7.1 => {
5868
+ Name => 'AFAreas',
5869
+ Format => 'int16u[7 * $val{3}]',
5870
+ Notes => q{
5871
+ X,Y position of each AF area, width, with "in-focus" for points in focus,
5872
+ "central" for the center of the selected area, or "peripheral" for points
5873
+ outside the selected area
5874
+ },
5875
+ Writable => 0,
5876
+ List => 1, # (for documentation purposes only)
5877
+ PrintConv => \&AFAreasK3III,
5878
+ },
5879
+ 11 => { # (the same for all areas in my samples, so only extract the first)
5880
+ Name => 'AFAreaSize',
5881
+ Condition => '$$self{NumAFPoints} > 0 and $$valPt !~ /^\0\0\0\0/',
5882
+ Notes => 'only for contrast-detect modes',
5883
+ Format => 'int16u[2]',
5884
+ Writable => 0,
5885
+ PrintConv => '$val=~s/ /x/; $val',
5886
+ },
5887
+ );
5888
+
5689
5889
  # white balance RGGB levels (ref 28)
5690
5890
  %Image::ExifTool::Pentax::WBLevels = (
5691
5891
  %binaryDataAttrs,
@@ -5749,7 +5949,7 @@ my %binaryDataAttrs = (
5749
5949
  },
5750
5950
  );
5751
5951
 
5752
- # lens information for Penax Q (ref PH)
5952
+ # lens information for Pentax Q (ref PH)
5753
5953
  # (306 bytes long, I wonder if this contains vignetting information too?)
5754
5954
  %Image::ExifTool::Pentax::LensInfoQ = (
5755
5955
  %binaryDataAttrs,
@@ -5792,21 +5992,21 @@ my %binaryDataAttrs = (
5792
5992
  },
5793
5993
  4 => {
5794
5994
  Name => 'AFPointsInFocus',
5795
- Condition => '$$self{Model} =~ /K-1\b/',
5995
+ Condition => '$$self{Model} =~ /K(P|-1|-70)\b/',
5796
5996
  Format => 'int8u[int(($val{2}+3)/4)]',
5797
5997
  Writable => 0,
5798
5998
  PrintConv => 'Image::ExifTool::Pentax::DecodeAFPoints($val,$$self{NumAFPoints},2,0x02)',
5799
5999
  },
5800
6000
  4.1 => {
5801
6001
  Name => 'AFPointsSelected',
5802
- Condition => '$$self{Model} =~ /K-1\b/',
6002
+ Condition => '$$self{Model} =~ /K(P|-1|-70)\b/',
5803
6003
  Format => 'int8u[int(($val{2}+3)/4)]',
5804
6004
  Writable => 0,
5805
6005
  PrintConv => 'Image::ExifTool::Pentax::DecodeAFPoints($val,$$self{NumAFPoints},2,0x03)',
5806
6006
  },
5807
6007
  4.2 => {
5808
6008
  Name => 'AFPointsSpecial',
5809
- Condition => '$$self{Model} =~ /K-1\b/',
6009
+ Condition => '$$self{Model} =~ /K(P|-1|-70)\b/',
5810
6010
  Format => 'int8u[int(($val{2}+3)/4)]',
5811
6011
  Writable => 0,
5812
6012
  PrintConv => 'Image::ExifTool::Pentax::DecodeAFPoints($val,$$self{NumAFPoints},2,0x03,0x03)',
@@ -6437,6 +6637,7 @@ sub DecodeAFPoints($$$$;$)
6437
6637
  {
6438
6638
  my ($val, $num, $bits, $mask, $bitVal) = @_;
6439
6639
  my @bytes = split ' ', $val;
6640
+ return '(none)' unless @bytes;
6440
6641
  my $i = 1; # (starts at AF point number 1)
6441
6642
  my $shift = 8 - $bits;
6442
6643
  my $byte = shift @bytes;
@@ -6459,9 +6660,9 @@ sub DecodeAFPoints($$$$;$)
6459
6660
  }
6460
6661
 
6461
6662
  #------------------------------------------------------------------------------
6462
- # Print AF Point names for K-3III (ref PH)
6663
+ # Print K-3III AF Point names (ref PH)
6463
6664
  # Inputs: 0) value, 1) ExifTool ref, 2) optional value to match
6464
- sub AFPointsK3iii($$;$)
6665
+ sub AFPointNamesK3III($$;$)
6465
6666
  {
6466
6667
  my @a = split ' ', $_[0];
6467
6668
  my $match = $_[2];
@@ -6475,10 +6676,10 @@ sub AFPointsK3iii($$;$)
6475
6676
  }
6476
6677
 
6477
6678
  #------------------------------------------------------------------------------
6478
- # Print AF point values for K-3III (ref PH)
6679
+ # Print K-3III AF point values (ref PH)
6479
6680
  # Inputs: 0) value, 1) ExifTool ref
6480
6681
  # Notes: this is experimental and not well understood
6481
- sub AFPointValues($$)
6682
+ sub AFPointValuesK3III($$)
6482
6683
  {
6483
6684
  my @a = split ' ', shift;
6484
6685
  my @vals;
@@ -6497,6 +6698,25 @@ sub AFPointValues($$)
6497
6698
  return @vals ? join ',', sort @vals : '(none)';
6498
6699
  }
6499
6700
 
6701
+ #------------------------------------------------------------------------------
6702
+ # Print K-3III AF point positions from tag 0x040c (ref KG)
6703
+ # Inputs: 0) raw value, 1) ExifTool ref
6704
+ sub AFAreasK3III($$)
6705
+ {
6706
+ my ($val, $et) = @_;
6707
+ return '(none)' unless $val;
6708
+ my @vals = split ' ', $val;
6709
+ # flags bits: [mask, value, description]
6710
+ my @flags = ([0x10,0x10,'central'],[0x08,0,'peripheral'],[0x04,0x04,'in-focus']);
6711
+ my ($i, @strs);
6712
+ for ($i=0; $i+7<=@vals; $i+=7) {
6713
+ my @a;
6714
+ ($vals[$i+6] & $$_[0]) == $$_[1] and push @a, $$_[2] foreach @flags;
6715
+ push @strs, $vals[$i+2] . ',' . $vals[$i+3] . (@a ? '(' . join(',',@a) . ')' : '');
6716
+ }
6717
+ return \@strs;
6718
+ }
6719
+
6500
6720
  #------------------------------------------------------------------------------
6501
6721
  # Convert Pentax hex-based EV (modulo 8) to real number
6502
6722
  # Inputs: 0) value to convert
@@ -11,7 +11,7 @@ package Image::ExifTool::Plot;
11
11
  use strict;
12
12
  use vars qw($VERSION);
13
13
 
14
- $VERSION = '1.03';
14
+ $VERSION = '1.05';
15
15
 
16
16
  # default plot settings (lower-case settings may be overridden by the user)
17
17
  my %defaults = (
@@ -201,7 +201,7 @@ sub AddPoints($$$)
201
201
  $$data{$name}[$xmax - $xmin] = $val if $xmax >= $xmin;
202
202
  next;
203
203
  }
204
- if ($docNum and $num{$name} < $docNum) {
204
+ if ($docNum and defined $num{$name} and $num{$name} < $docNum) {
205
205
  $num{$name} = $docNum; # keep documents synchronized if some tags are missing
206
206
  } else {
207
207
  $num{$name} = $xmax unless defined $num{$name};
@@ -321,7 +321,6 @@ sub Draw($$)
321
321
  foreach (0 .. (($multi[$plotNum] || 1) - 1)) {
322
322
  push @{$$self{Name}}, shift(@names);
323
323
  }
324
- warn "@{$$self{Name}}\n";
325
324
  undef $min; undef $max;
326
325
  foreach ($scat .. (@{$$self{Name}} - 1)) {
327
326
  my $dat = $$self{Data}{$$self{Name}[$_]};
@@ -49,7 +49,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
49
49
  use Image::ExifTool::Exif;
50
50
  use Image::ExifTool::GPS;
51
51
 
52
- $VERSION = '3.17';
52
+ $VERSION = '3.19';
53
53
 
54
54
  sub ProcessMOV($$;$);
55
55
  sub ProcessKeys($$$);
@@ -2379,7 +2379,14 @@ my %userDefined = (
2379
2379
  # saut - 4 bytes all zero (Samsung SM-N900T)
2380
2380
  # smrd - string "TRUEBLUE" (Samsung SM-C101, etc)
2381
2381
  # ---- Sigma ----
2382
- SIGM => {
2382
+ SIGM => [{
2383
+ Name => 'SigmaEXIF',
2384
+ Condition => '$$valPt =~ /^(II\x2a\0|MM\0\x2a)/',
2385
+ SubDirectory => {
2386
+ TagTable => 'Image::ExifTool::Exif::Main',
2387
+ ProcessProc => \&Image::ExifTool::ProcessTIFF, # (because ProcessMOV is default)
2388
+ },
2389
+ },{
2383
2390
  Name => 'PreviewImage',
2384
2391
  # 32-byte header followed by preview image. Length at offset 6 in header
2385
2392
  Condition => 'length($$valPt) > 0x20 and length($$valPt) == unpack("x6V",$$valPt) + 0x20',
@@ -2396,7 +2403,7 @@ my %userDefined = (
2396
2403
  }
2397
2404
  return $pt;
2398
2405
  },
2399
- },
2406
+ }],
2400
2407
  # ---- TomTom Bandit Action Cam ----
2401
2408
  TTMD => {
2402
2409
  Name => 'TomTomMetaData',
@@ -2937,7 +2944,7 @@ my %userDefined = (
2937
2944
  Writable => 'int8u',
2938
2945
  Protected => 1,
2939
2946
  PrintConv => {
2940
- 0 => 'Horizontal (Normal)',
2947
+ 0 => 'Horizontal (normal)',
2941
2948
  1 => 'Rotate 270 CW',
2942
2949
  2 => 'Rotate 180',
2943
2950
  3 => 'Rotate 90 CW',
@@ -10522,12 +10529,13 @@ QTLang: foreach $tag (@{$$et{QTLang}}) {
10522
10529
  for (; $trailer; $trailer=$$trailer[3]) {
10523
10530
  next if $lastPos > $$trailer[1]; # skip if we have already processed this as an atom
10524
10531
  last unless $raf->Seek($$trailer[1], 0);
10525
- if ($$trailer[0] eq 'LigoGPS' and $raf->Read($buff, 8) == 8 and $buff =~ /skip$/) {
10532
+ if ($$trailer[0] eq 'LigoGPS' and $raf->Read($buff, 8) == 8 and $buff =~ /skip$/i) {
10526
10533
  $ee or $et->Warn('Use the ExtractEmbedded option to decode timed GPS',3), next;
10527
10534
  my $len = Get32u(\$buff, 0) - 16;
10528
10535
  if ($len > 0 and $raf->Read($buff, $len) == $len and $buff =~ /^LIGOGPSINFO\0/) {
10529
10536
  my $tbl = GetTagTable('Image::ExifTool::QuickTime::Stream');
10530
10537
  my %dirInfo = ( DataPt => \$buff, DataPos => $$trailer[1] + 8, DirName => 'LigoGPSTrailer' );
10538
+ $et->VerboseDump(\$buff, DataPos => $dirInfo{DataPos});
10531
10539
  Image::ExifTool::LigoGPS::ProcessLigoGPS($et, \%dirInfo, $tbl);
10532
10540
  } else {
10533
10541
  $et->Warn('Unrecognized data in LigoGPS trailer');