exiftool_vendored 13.31.0 → 13.36.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 (53) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +88 -2
  3. data/bin/MANIFEST +5 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/Makefile.PL +1 -0
  7. data/bin/README +47 -46
  8. data/bin/exiftool +155 -120
  9. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +7 -5
  10. data/bin/lib/Image/ExifTool/Canon.pm +46 -6
  11. data/bin/lib/Image/ExifTool/DJI.pm +54 -3
  12. data/bin/lib/Image/ExifTool/Exif.pm +9 -6
  13. data/bin/lib/Image/ExifTool/FlashPix.pm +4 -159
  14. data/bin/lib/Image/ExifTool/FujiFilm.pm +97 -32
  15. data/bin/lib/Image/ExifTool/Geolocation.dat +0 -0
  16. data/bin/lib/Image/ExifTool/Geotag.pm +5 -3
  17. data/bin/lib/Image/ExifTool/GoPro.pm +14 -2
  18. data/bin/lib/Image/ExifTool/LNK.pm +4 -1
  19. data/bin/lib/Image/ExifTool/Lang/cs.pm +0 -1
  20. data/bin/lib/Image/ExifTool/Lang/de.pm +0 -1
  21. data/bin/lib/Image/ExifTool/Lang/fr.pm +0 -1
  22. data/bin/lib/Image/ExifTool/Lang/it.pm +0 -1
  23. data/bin/lib/Image/ExifTool/Lang/ja.pm +0 -1
  24. data/bin/lib/Image/ExifTool/Lang/nl.pm +0 -1
  25. data/bin/lib/Image/ExifTool/Lang/pl.pm +0 -1
  26. data/bin/lib/Image/ExifTool/Lang/zh_cn.pm +0 -1
  27. data/bin/lib/Image/ExifTool/M2TS.pm +2 -4
  28. data/bin/lib/Image/ExifTool/Microsoft.pm +158 -1
  29. data/bin/lib/Image/ExifTool/Minolta.pm +4 -2
  30. data/bin/lib/Image/ExifTool/Nikon.pm +73 -37
  31. data/bin/lib/Image/ExifTool/NikonCustom.pm +40 -10
  32. data/bin/lib/Image/ExifTool/Olympus.pm +258 -34
  33. data/bin/lib/Image/ExifTool/Panasonic.pm +3 -3
  34. data/bin/lib/Image/ExifTool/Pentax.pm +341 -61
  35. data/bin/lib/Image/ExifTool/Protobuf.pm +1 -1
  36. data/bin/lib/Image/ExifTool/QuickTime.pm +11 -4
  37. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +1 -1
  38. data/bin/lib/Image/ExifTool/README +2 -1
  39. data/bin/lib/Image/ExifTool/RIFF.pm +5 -3
  40. data/bin/lib/Image/ExifTool/Sony.pm +46 -17
  41. data/bin/lib/Image/ExifTool/TNEF.pm +487 -0
  42. data/bin/lib/Image/ExifTool/TagLookup.pm +4384 -4265
  43. data/bin/lib/Image/ExifTool/TagNames.pod +291 -27
  44. data/bin/lib/Image/ExifTool/WriteExif.pl +14 -12
  45. data/bin/lib/Image/ExifTool/Writer.pl +21 -16
  46. data/bin/lib/Image/ExifTool/XMP.pm +8 -2
  47. data/bin/lib/Image/ExifTool/XMP2.pl +1 -1
  48. data/bin/lib/Image/ExifTool/XMPStruct.pl +1 -1
  49. data/bin/lib/Image/ExifTool.pm +14 -4
  50. data/bin/lib/Image/ExifTool.pod +50 -44
  51. data/bin/perl-Image-ExifTool.spec +46 -45
  52. data/lib/exiftool_vendored/version.rb +1 -1
  53. 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.52';
62
+ $VERSION = '3.57';
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
@@ -560,6 +564,7 @@ my %pentaxModelID = (
560
564
  0x1329a => 'GR IIIx', # (Ricoh)
561
565
  0x132b8 => 'KF', #github322 (Ricoh)
562
566
  0x132d6 => 'K-3 Mark III Monochrome', #github226 (Ricoh)
567
+ 0x132e0 => 'GR IV', #github347 (Ricoh)
563
568
  );
564
569
 
565
570
  # Pentax city codes - (PH, Optio WP)
@@ -747,6 +752,11 @@ my @k3iiiAF = qw(
747
752
  C1 E1 G1 I1 K1 C3 E3 G3 I3 K3 C5 E5 G5
748
753
  I5 K5 C7 E7 G7 I7 K7 C9 E9 G9 I9 K9 A5 M5 B3
749
754
  L3 B5 L5 B7 L7 B1 L1 B9 L9 A3 M3 A7 M7
755
+ D1 F1 H1 J1 D3 F3 H3 J3 D5 F5 H5 J5 D7
756
+ F7 H7 J7 D9 F9 H9 J9 C2 E2 G2 I2 K2 C4
757
+ E4 G4 I4 K4 C6 E6 G6 I6 K6 C8 E8 G8 I8
758
+ K8 B2 L2 B4 L4 B6 L6 B8 L8 A1 M1 A2 M2
759
+ A4 M4 A6 M6 A8 M8 A9 M9
750
760
  );
751
761
 
752
762
  # decoding for Pentax Firmware ID tags - PH
@@ -1148,31 +1158,38 @@ my %binaryDataAttrs = (
1148
1158
  Notes => 'Pentax models',
1149
1159
  Writable => 'int16u',
1150
1160
  PrintConvColumns => 2,
1161
+ PrintHex => 1,
1151
1162
  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)
1163
+ 0x00 => 'Normal',
1164
+ 0x01 => 'Macro',
1165
+ 0x02 => 'Infinity',
1166
+ 0x03 => 'Manual',
1167
+ 0x04 => 'Super Macro', #JD
1168
+ 0x05 => 'Pan Focus',
1169
+ 0x06 => 'Auto-area', # (GR III)
1170
+ 0x07 => 'Zone Select', # (GR III)
1171
+ 0x08 => 'Select', # (GR III)
1172
+ 0x09 => 'Pinpoint', # (GR III)
1173
+ 0x0a => 'Tracking', # (GR III)
1174
+ 0x0b => 'Continuous', # (GR III)
1175
+ 0x0c => 'Snap', # (GR III)
1176
+ 0x10 => 'AF-S (Focus-priority)', #17
1177
+ 0x11 => 'AF-C (Focus-priority)', #17
1178
+ 0x12 => 'AF-A (Focus-priority)', #PH (educated guess)
1179
+ 0x20 => 'Contrast-detect (Focus-priority)', #PH (K-5)
1180
+ 0x21 => 'Tracking Contrast-detect (Focus-priority)', #PH (K-5)
1169
1181
  # 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
1182
+ 0x110 => 'AF-S (Release-priority)', #PH (K-5,K-3)
1183
+ 0x111 => 'AF-C (Release-priority)', #PH (K-5,K-3)
1184
+ 0x112 => 'AF-A (Release-priority)', #PH (K-3)
1185
+ 0x120 => 'Contrast-detect (Release-priority)', #PH (K-01)
1186
+ # bit 15 indicates macro mode (disabled for MF, and defaults to Select for Snap, Infinity)
1187
+ 0x8006 => 'Auto-area (Macro)', # (GR III)
1188
+ 0x8007 => 'Zone Select (Macro)', # (GR III)
1189
+ 0x8008 => 'Select (Macro)', # (GR III)
1190
+ 0x8009 => 'Pinpoint (Macro)', # (GR III)
1191
+ 0x800a => 'Tracking (Macro)', # (GR III)
1192
+ 0x800b => 'Continuous (Macro)', # (GR III)
1176
1193
  },
1177
1194
  },{
1178
1195
  Name => 'FocusMode',
@@ -1188,7 +1205,7 @@ my %binaryDataAttrs = (
1188
1205
  ],
1189
1206
  0x000e => [{ #29
1190
1207
  Name => 'AFPointSelected',
1191
- Condition => '$$self{Model} =~ /K-1\b/',
1208
+ Condition => '$$self{Model} =~ /(K-1|645Z)\b/', # (NC for 645Z)
1192
1209
  Writable => 'int16u',
1193
1210
  Notes => 'K-1',
1194
1211
  PrintConvColumns => 2,
@@ -1367,16 +1384,20 @@ my %binaryDataAttrs = (
1367
1384
  9 => 'Lower-left',
1368
1385
  10 => 'Bottom',
1369
1386
  11 => 'Lower-right',
1370
- },
1387
+ },{
1371
1388
  # (second number exists for K-5II(s) is usually 0, but is 1 for AF.C with
1372
1389
  # AFPointMode=='Select' and extended tracking focus points are enabled in the settings)
1373
- ],
1390
+ # -----
1391
+ #KG: for K-70 and older models with 11 PDAF points (K-S2, K-S1, K-50, K-500, K-30, K-5II(s) )
1392
+ 0 => 'Single Point', # Select AF (1-point) in both PDAF and CAF modes
1393
+ 1 => 'Expanded Area', # Expanded Area AF in AF-C
1394
+ }],
1374
1395
  }],
1375
1396
  0x000f => [{ #PH
1376
1397
  Name => 'AFPointsInFocus',
1377
- Condition => '$$self{Model} =~ /K-3\b/',
1398
+ Condition => '$$self{Model} =~ /K-(3|S1|S2)\b/', #KG: valid also for K-S1/S2
1378
1399
  Writable => 'int32u',
1379
- Notes => 'K-3 only',
1400
+ Notes => 'K-3, K-S1 and K-S2 only',
1380
1401
  PrintHex => 1,
1381
1402
  PrintConv => {
1382
1403
  0 => '(none)',
@@ -1957,6 +1978,8 @@ my %binaryDataAttrs = (
1957
1978
  '18 3' => 'Auto Program (MTF)', #PH (NC)
1958
1979
  '18 22' => 'Auto Program (Shallow DOF)', #PH (NC)
1959
1980
  '20 22' => 'Blur Control', #PH (Q)
1981
+ '24 0' => 'Aperture Priority (Adv.Hyp)', #KG
1982
+ '25 0' => 'Manual Exposure (Adv.Hyp)', #KG
1960
1983
  '26 0' => 'Shutter and Aperture Priority (TAv)', #PH (K-3III)
1961
1984
  '249 0' => 'Movie (TAv)', #31
1962
1985
  '250 0' => 'Movie (TAv, Auto Aperture)', #31
@@ -1978,10 +2001,13 @@ my %binaryDataAttrs = (
1978
2001
  Count => 4,
1979
2002
  PrintConv => [{
1980
2003
  0 => 'Single-frame', # (also Interval Shooting for K-01 - PH)
1981
- 1 => 'Continuous', # (K-5 Hi)
1982
- 2 => 'Continuous (Lo)', #PH (K-5)
2004
+ 1 => 'Continuous', #KG *ist D, *ist Ds, *ist DS2, K110D, K10D, K100D, K100D Super, K20D, Ricoh GR III / GR IIIx
2005
+ #KG Hi: K200D, K-x, K-7, K-r, K-5, K-01, K-5 II, K-5 IIs, K-30, K-500, K-50, K-S1, K-S2, K-70
2006
+ #KG High: K-3, K-3 II, K-1, K-1 II, KP, K-3 III, K-3 III Mono
2007
+ 2 => 'Continuous (Lo)', #KG all models listed under 'Hi'
1983
2008
  3 => 'Burst', #PH (K20D)
1984
- 4 => 'Continuous (Medium)', #PH (K-3)
2009
+ 4 => 'Continuous (Medium)', #KG all models listed under 'High'
2010
+ 5 => 'Continuous (Low)', #KG all models listed under 'High'
1985
2011
  255 => 'Video', #PH (K-x)
1986
2012
  },{
1987
2013
  0 => 'No Timer',
@@ -2169,7 +2195,7 @@ my %binaryDataAttrs = (
2169
2195
  11 => 'Flat', #31 (K-70)
2170
2196
  # the following values from GR III
2171
2197
  256 => 'Standard',
2172
- 257 => 'Vivid',
2198
+ 257 => 'Vivid',
2173
2199
  258 => 'Monotone',
2174
2200
  259 => 'Soft Monotone',
2175
2201
  260 => 'Hard Monotone',
@@ -2989,7 +3015,7 @@ my %binaryDataAttrs = (
2989
3015
  }],
2990
3016
  0x022b => [{
2991
3017
  Name => 'LevelInfoK3III',
2992
- Condition => '$$self{Model} eq "PENTAX K-3 Mark III"',
3018
+ Condition => '$$self{Model} =~ /K-3 Mark III/',
2993
3019
  SubDirectory => { TagTable => 'Image::ExifTool::Pentax::LevelInfoK3III' },
2994
3020
  },{ #PH (K-5)
2995
3021
  Name => 'LevelInfo',
@@ -3097,13 +3123,20 @@ my %binaryDataAttrs = (
3097
3123
  # 0x0406 - undef[4116] (K-5)
3098
3124
  # 0x0407 - undef[3072] (Q DNG)
3099
3125
  # 0x0408 - undef[1024] (Q DNG)
3126
+ 0x040b => {
3127
+ Name => 'FaceInfoK3III',
3128
+ # undef[1640] (actually int32u[410], K3III)
3129
+ SubDirectory => { TagTable => 'Image::ExifTool::Pentax::FaceInfoK3III' },
3130
+ },
3131
+ 0x040c => {
3132
+ Name => 'AFInfoK3III',
3133
+ SubDirectory => { TagTable => 'Image::ExifTool::Pentax::AFInfoK3III' },
3134
+ },
3100
3135
  0x0e00 => {
3101
3136
  Name => 'PrintIM',
3102
3137
  Description => 'Print Image Matching',
3103
3138
  Writable => 0,
3104
- SubDirectory => {
3105
- TagTable => 'Image::ExifTool::PrintIM::Main',
3106
- },
3139
+ SubDirectory => { TagTable => 'Image::ExifTool::PrintIM::Main' },
3107
3140
  },
3108
3141
  );
3109
3142
 
@@ -5006,11 +5039,11 @@ my %binaryDataAttrs = (
5006
5039
  # 0x0a - values: 00,05,0d,15,86,8e,a6,ae
5007
5040
  0x0b => { #JD
5008
5041
  Name => 'AFPointsInFocus',
5009
- Condition => '$$self{Model} !~ /(K-(1|3|70)|KP)\b/',
5042
+ Condition => '$$self{Model} !~ /(K-(1|3|70|S1|S2)|KP)\b/', #KG: valid also for K-S1/S2
5010
5043
  Notes => q{
5011
- models other than the K-1, K-3, K-70 and KP. May report two points in focus
5012
- even though a single AFPoint has been selected, in which case the selected
5013
- AFPoint is the first reported
5044
+ models other than the K-1, K-3, K-70, KP and K-S1/S2. May report two points
5045
+ in focus even though a single AFPoint has been selected, in which case the
5046
+ selected AFPoint is the first reported
5014
5047
  },
5015
5048
  PrintConvColumns => 2,
5016
5049
  PrintConv => {
@@ -5039,43 +5072,46 @@ my %binaryDataAttrs = (
5039
5072
  },
5040
5073
  0x14 => {
5041
5074
  Name => 'AFPointValues',
5042
- Condition => '$$self{Model} eq "PENTAX K-3 Mark III"', # any other models?
5075
+ Condition => '$$self{Model} =~ /K-3 Mark III/', #KG
5043
5076
  Format => 'int16uRev[69]',
5044
5077
  Unknown => 1,
5045
5078
  Notes => 'some unknown values related to each AFPoint',
5046
- # order is the same as AFPoints below, but there is an additional value for
5079
+ # order is the same as AFPointsSelected below, but there is an additional value for
5047
5080
  # each AF point starting at offset 28 in the array (yes, the range overlaps
5048
5081
  # with the 1st values)
5049
5082
  # (values are int16s stored in reversed byte order)
5050
5083
  ValueConv => 'my @a=split " ",$val;$_>32767 and $_-=65536 foreach @a;join " ",@a',
5051
- PrintConv => \&AFPointValues,
5084
+ PrintConv => \&AFPointValuesK3III,
5052
5085
  },
5053
- 0x12a => { # byte has a value of 2 if corresponding AF point is selected
5054
- Name => 'AFPointsSelected',
5055
- Condition => '$$self{Model} eq "PENTAX K-3 Mark III"', # any other models?
5086
+ 0x12a => {
5087
+ Name => 'AFPointsSelected', # (should probably be "AFPointSelected", but the bitmask allows multiple points)
5088
+ Condition => '$$self{Model} =~ /K-3 Mark III/',
5056
5089
  Notes => q{
5057
5090
  K-3III only. 41 selectable AF points from a total of 101 available in a 13x9
5058
- grid. Columns are labelled A-M and rows are 1-9. The center point is G5
5091
+ grid. Columns are labelled A-M and rows are 1-9. The center point is G5. The
5092
+ exact meaning of this tag is not fully understood, although it does seem
5093
+ related to the selected AF point
5059
5094
  },
5060
- Format => 'int8u[41]',
5061
- PrintConv => 'Image::ExifTool::Pentax::AFPointsK3iii($val,$self,2)',
5095
+ Format => 'int8u[101]',
5096
+ # value of 1 means "selected point", and 2 means "center of selected area"
5097
+ PrintConv => \&AFPointNamesK3III,
5062
5098
  },
5063
5099
  #
5064
5100
  # (maybe not coincidentally, there are 60 unknown bytes
5065
5101
  # here, and there are also 60 non-selectable AF points)
5066
5102
  #
5067
5103
  0x18f => { # byte has a value of 1 if corresponding AF point is ... in focus maybe?
5068
- # usually the same points as AFPoints above, but not always
5104
+ # usually the same points as AFPointsSelected above, but not always
5069
5105
  Name => 'AFPointsUnknown',
5070
- Condition => '$$self{Model} eq "PENTAX K-3 Mark III"', # any other models?
5106
+ Condition => '$$self{Model} =~ /K-3 Mark III/', #KG
5071
5107
  Unknown => 1,
5072
- Format => 'int8u[41]',
5073
- PrintConv => \&AFPointsK3iii,
5108
+ Format => 'int8u[101]',
5109
+ PrintConv => \&AFPointNamesK3III,
5074
5110
  },
5075
5111
  0x1fa => {
5076
5112
  Name => 'LiveView',
5077
5113
  Notes => 'decoded only for the K-3 III',
5078
- Condition => '$$self{Model} eq "PENTAX K-3 Mark III"', # and other models?
5114
+ Condition => '$$self{Model} =~ /K-3 Mark III/', #KG
5079
5115
  PrintConv => { 0 => 'Off', 1 => 'On' },
5080
5116
  },
5081
5117
  0x1fd => {
@@ -5084,6 +5120,54 @@ my %binaryDataAttrs = (
5084
5120
  Condition => '$$self{Model} eq "PENTAX K-3 II"',
5085
5121
  PrintConv => { 0 => 'Off', 1 => 'Short', 2 => 'Medium', 3 => 'Long' },
5086
5122
  },
5123
+ 0x021f => { #KG
5124
+ Name => 'FirstFrameActionInAFC',
5125
+ Condition => '$$self{Model} =~ /K-3 Mark III/',
5126
+ PrintConv => {
5127
+ '0' => 'Auto',
5128
+ '1' => 'Release Priority',
5129
+ '2' => 'Focus Priority',
5130
+ # there is at least another value '3' but I couldn't figure out the
5131
+ # meaning. However, this occurs for a few AF-S captures, so it has
5132
+ # no real practical meaning.
5133
+ },
5134
+ },
5135
+ 0x0220 => { #KG
5136
+ Name => 'ActionInAFCCont',
5137
+ Condition => '$$self{Model} =~ /K-3 Mark III/',
5138
+ PrintConv => {
5139
+ '0' => 'Auto',
5140
+ '1' => 'Focus Priority',
5141
+ '2' => 'FPS Priority',
5142
+ },
5143
+ },
5144
+ 545 => { #KG
5145
+ Name => 'AFCHold',
5146
+ Condition => '$$self{Model} =~ /K-3 Mark III/',
5147
+ Mask => 0x03,
5148
+ PrintConv => { 0 => 'Low', 1 => 'Medium', 2 => 'High', 3 => 'Off' },
5149
+ },
5150
+ 545.1 => { #KG
5151
+ Name => 'AFCPointTracking',
5152
+ Condition => '$$self{Model} =~ /K-3 Mark III/',
5153
+ Mask => 0x0c,
5154
+ PrintConv => { 0 => 'Type 1', 1 => 'Type 2', 2 => 'Type 3' },
5155
+ },
5156
+ 545.2 => { #KG
5157
+ Name => 'AFCSensitivity',
5158
+ Condition => '$$self{Model} =~ /K-3 Mark III/',
5159
+ Mask => 0x70,
5160
+ PrintConv => '5 - $val',
5161
+ PrintConvInv => '5 - $val',
5162
+ },
5163
+ 0x0960 => { #KG
5164
+ Name => 'SubjectRecognition',
5165
+ Condition => '$$self{Model} =~ /K-3 Mark III/',
5166
+ PrintConv => {
5167
+ 0 => 'Off',
5168
+ 1 => 'On',
5169
+ },
5170
+ },
5087
5171
  );
5088
5172
 
5089
5173
  # AF information for K-01 and later (ref Karsten Gieselmann private communication)
@@ -5097,7 +5181,7 @@ my %binaryDataAttrs = (
5097
5181
  Name => 'NumCAFPoints',
5098
5182
  RawConv => '$$self{NumCAFPoints} = ($val & 0x0f) * ($val >> 4); $val',
5099
5183
  ValueConv => '($val >> 4) * ($val & 0x0f)',
5100
- },
5184
+ },
5101
5185
  1.1 => {
5102
5186
  Name => 'CAFGridSize',
5103
5187
  ValueConv => '($val >> 4) . " " . ($val & 0x0f)', # (width x height)
@@ -5687,6 +5771,175 @@ my %binaryDataAttrs = (
5687
5771
  ValueConvInv => '-$val * 2',
5688
5772
  },
5689
5773
  );
5774
+
5775
+ %Image::ExifTool::Pentax::FaceInfoK3III = (
5776
+ %binaryDataAttrs,
5777
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
5778
+ FORMAT => 'int32u',
5779
+ DATAMEMBER => [ 6, 8 ],
5780
+ 0.1 => {
5781
+ Name => 'FaceInfoK3III',
5782
+ Format => 'int32u[$size/4]',
5783
+ Notes => q{
5784
+ entire FaceInfoK3III structure. Provides access to raw numerical values and
5785
+ facilitates the writing of the whole structure
5786
+ },
5787
+ Unknown => 1,
5788
+ },
5789
+ 0 => { Name => 'FaceImageSize', Format => 'int32u[2]' },
5790
+ 2 => { Name => 'CAFArea', Format => 'int32u[4]', Notes => 'top, left, width, height' },
5791
+ 6 => { Name => 'FacesDetectedA', RawConv => '$$self{FacesA} = $val' },
5792
+ 8 => { Name => 'FacesDetectedB', RawConv => '$$self{FacesA} = $val' },
5793
+ 10 => { Name => 'Face1AArea', Condition => '$$self{FacesA} >= 1', Format => 'int32u[4]' },
5794
+ 14 => { Name => 'Face1AEye1', Condition => '$$self{FacesA} >= 1', Format => 'int32u[4]' },
5795
+ 18 => { Name => 'Face1AEye2', Condition => '$$self{FacesA} >= 1', Format => 'int32u[4]' },
5796
+ 30 => { Name => 'Face2AArea', Condition => '$$self{FacesA} >= 2', Format => 'int32u[4]' },
5797
+ 34 => { Name => 'Face2AEye1', Condition => '$$self{FacesA} >= 2', Format => 'int32u[4]' },
5798
+ 38 => { Name => 'Face2AEye2', Condition => '$$self{FacesA} >= 2', Format => 'int32u[4]' },
5799
+ 50 => { Name => 'Face3AArea', Condition => '$$self{FacesA} >= 3', Format => 'int32u[4]' },
5800
+ 54 => { Name => 'Face3AEye1', Condition => '$$self{FacesA} >= 3', Format => 'int32u[4]' },
5801
+ 58 => { Name => 'Face3AEye2', Condition => '$$self{FacesA} >= 3', Format => 'int32u[4]' },
5802
+ 70 => { Name => 'Face4AArea', Condition => '$$self{FacesA} >= 4', Format => 'int32u[4]' },
5803
+ 74 => { Name => 'Face4AEye1', Condition => '$$self{FacesA} >= 4', Format => 'int32u[4]' },
5804
+ 78 => { Name => 'Face4AEye2', Condition => '$$self{FacesA} >= 4', Format => 'int32u[4]' },
5805
+ 90 => { Name => 'Face5AArea', Condition => '$$self{FacesA} >= 5', Format => 'int32u[4]' },
5806
+ 94 => { Name => 'Face5AEye1', Condition => '$$self{FacesA} >= 5', Format => 'int32u[4]' },
5807
+ 98 => { Name => 'Face5AEye2', Condition => '$$self{FacesA} >= 5', Format => 'int32u[4]' },
5808
+ 110 => { Name => 'Face6AArea', Condition => '$$self{FacesA} >= 6', Format => 'int32u[4]' },
5809
+ 114 => { Name => 'Face6AEye1', Condition => '$$self{FacesA} >= 6', Format => 'int32u[4]' },
5810
+ 118 => { Name => 'Face6AEye2', Condition => '$$self{FacesA} >= 6', Format => 'int32u[4]' },
5811
+ 130 => { Name => 'Face7AArea', Condition => '$$self{FacesA} >= 7', Format => 'int32u[4]' },
5812
+ 134 => { Name => 'Face7AEye1', Condition => '$$self{FacesA} >= 7', Format => 'int32u[4]' },
5813
+ 138 => { Name => 'Face7AEye2', Condition => '$$self{FacesA} >= 7', Format => 'int32u[4]' },
5814
+ 150 => { Name => 'Face8AArea', Condition => '$$self{FacesA} >= 8', Format => 'int32u[4]' },
5815
+ 154 => { Name => 'Face8AEye1', Condition => '$$self{FacesA} >= 8', Format => 'int32u[4]' },
5816
+ 158 => { Name => 'Face8AEye2', Condition => '$$self{FacesA} >= 8', Format => 'int32u[4]' },
5817
+ 170 => { Name => 'Face9AArea', Condition => '$$self{FacesA} >= 9', Format => 'int32u[4]' },
5818
+ 174 => { Name => 'Face9AEye1', Condition => '$$self{FacesA} >= 9', Format => 'int32u[4]' },
5819
+ 178 => { Name => 'Face9AEye2', Condition => '$$self{FacesA} >= 9', Format => 'int32u[4]' },
5820
+ 190 => { Name => 'Face10AArea',Condition => '$$self{FacesA} >= 10', Format => 'int32u[4]' },
5821
+ 194 => { Name => 'Face10AEye1',Condition => '$$self{FacesA} >= 10', Format => 'int32u[4]' },
5822
+ 198 => { Name => 'Face10AEye2',Condition => '$$self{FacesA} >= 10', Format => 'int32u[4]' },
5823
+ 210 => { Name => 'Face1BArea', Condition => '$$self{FacesA} >= 1', Format => 'int32u[4]' },
5824
+ 214 => { Name => 'Face1BEye1', Condition => '$$self{FacesA} >= 1', Format => 'int32u[4]' },
5825
+ 218 => { Name => 'Face1BEye2', Condition => '$$self{FacesA} >= 1', Format => 'int32u[4]' },
5826
+ 230 => { Name => 'Face2BArea', Condition => '$$self{FacesA} >= 2', Format => 'int32u[4]' },
5827
+ 234 => { Name => 'Face2BEye1', Condition => '$$self{FacesA} >= 2', Format => 'int32u[4]' },
5828
+ 238 => { Name => 'Face2BEye2', Condition => '$$self{FacesA} >= 2', Format => 'int32u[4]' },
5829
+ 250 => { Name => 'Face3BArea', Condition => '$$self{FacesA} >= 3', Format => 'int32u[4]' },
5830
+ 254 => { Name => 'Face3BEye1', Condition => '$$self{FacesA} >= 3', Format => 'int32u[4]' },
5831
+ 258 => { Name => 'Face3BEye2', Condition => '$$self{FacesA} >= 3', Format => 'int32u[4]' },
5832
+ 270 => { Name => 'Face4BArea', Condition => '$$self{FacesA} >= 4', Format => 'int32u[4]' },
5833
+ 274 => { Name => 'Face4BEye1', Condition => '$$self{FacesA} >= 4', Format => 'int32u[4]' },
5834
+ 278 => { Name => 'Face4BEye2', Condition => '$$self{FacesA} >= 4', Format => 'int32u[4]' },
5835
+ 290 => { Name => 'Face5BArea', Condition => '$$self{FacesA} >= 5', Format => 'int32u[4]' },
5836
+ 294 => { Name => 'Face5BEye1', Condition => '$$self{FacesA} >= 5', Format => 'int32u[4]' },
5837
+ 298 => { Name => 'Face5BEye2', Condition => '$$self{FacesA} >= 5', Format => 'int32u[4]' },
5838
+ 310 => { Name => 'Face6BArea', Condition => '$$self{FacesA} >= 6', Format => 'int32u[4]' },
5839
+ 314 => { Name => 'Face6BEye1', Condition => '$$self{FacesA} >= 6', Format => 'int32u[4]' },
5840
+ 318 => { Name => 'Face6BEye2', Condition => '$$self{FacesA} >= 6', Format => 'int32u[4]' },
5841
+ 330 => { Name => 'Face7BArea', Condition => '$$self{FacesA} >= 7', Format => 'int32u[4]' },
5842
+ 334 => { Name => 'Face7BEye1', Condition => '$$self{FacesA} >= 7', Format => 'int32u[4]' },
5843
+ 338 => { Name => 'Face7BEye2', Condition => '$$self{FacesA} >= 7', Format => 'int32u[4]' },
5844
+ 350 => { Name => 'Face8BArea', Condition => '$$self{FacesA} >= 8', Format => 'int32u[4]' },
5845
+ 354 => { Name => 'Face8BEye1', Condition => '$$self{FacesA} >= 8', Format => 'int32u[4]' },
5846
+ 358 => { Name => 'Face8BEye2', Condition => '$$self{FacesA} >= 8', Format => 'int32u[4]' },
5847
+ 370 => { Name => 'Face9BArea', Condition => '$$self{FacesA} >= 9', Format => 'int32u[4]' },
5848
+ 374 => { Name => 'Face9BEye1', Condition => '$$self{FacesA} >= 9', Format => 'int32u[4]' },
5849
+ 378 => { Name => 'Face9BEye2', Condition => '$$self{FacesA} >= 9', Format => 'int32u[4]' },
5850
+ 390 => { Name => 'Face10BArea',Condition => '$$self{FacesA} >= 10', Format => 'int32u[4]' },
5851
+ 394 => { Name => 'Face10BEye1',Condition => '$$self{FacesA} >= 10', Format => 'int32u[4]' },
5852
+ 398 => { Name => 'Face10BEye2',Condition => '$$self{FacesA} >= 10', Format => 'int32u[4]' },
5853
+ );
5854
+
5855
+ %Image::ExifTool::Pentax::AFInfoK3III = (
5856
+ %binaryDataAttrs,
5857
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
5858
+ FORMAT => 'int16u',
5859
+ DATAMEMBER => [ 3 ],
5860
+ NOTES => 'AF tags written by the K-3 Mark III, GR III and GR IIIx.',
5861
+ 0 => {
5862
+ Name => 'AFInfo',
5863
+ Format => 'int16u[$size/2]',
5864
+ Notes => q{
5865
+ entire AFInfoK3III structure. Provides access to raw numerical values and
5866
+ facilitates the writing of the whole structure
5867
+ },
5868
+ Unknown => 1,
5869
+ },
5870
+ 0.1 => {
5871
+ Name => 'AFMode',
5872
+ PrintConv => {
5873
+ 0 => 'Phase Detect',
5874
+ 2 => 'Contrast Detect',
5875
+ 255 => 'Manual Focus',
5876
+ },
5877
+ },
5878
+ 1 => {
5879
+ Name => 'AFSelectionMode',
5880
+ PrintHex => 1,
5881
+ PrintConv => {
5882
+ 0 => 'Manual Focus',
5883
+ 1 => 'Spot',
5884
+ 2 => 'Select (5-points)',
5885
+ 3 => 'Expanded Area (S)',
5886
+ 4 => 'Expanded Area (M)',
5887
+ 5 => 'Expanded Area (L)',
5888
+ 6 => 'Select (S)',
5889
+ 7 => 'Zone Select (21-point)',
5890
+ 8 => 'Select XS',
5891
+ 0xff => 'Auto Area',
5892
+ # Contrast-detect modes
5893
+ 0x2001 => 'Contrast-detect Auto Area',
5894
+ 0x2002 => 'Contrast-detect Select', # (GR III)
5895
+ 0x2003 => 'Pinpoint', # (GR III)
5896
+ 0x2004 => 'Tracking',
5897
+ 0x2005 => 'Continuous', # (GR III)
5898
+ 0x2006 => 'Face Detection',
5899
+ 0x2007 => 'Contrast-detect Select (S)',
5900
+ 0x2008 => 'Contrast-detect Select (M)',
5901
+ 0x2009 => 'Contrast-detect Select (L)',
5902
+ 0x200a => 'Contrast-detect Zone Select', # (GR III)
5903
+ 0x200b => 'Contrast-detect Spot',
5904
+ },
5905
+ },
5906
+ 3 => {
5907
+ Name => 'NumAFPoints',
5908
+ RawConv => '$$self{NumAFPoints} = $val',
5909
+ },
5910
+ # the data for each AF point consists of 7 int16u values:
5911
+ # the frame width/height, the X/Y position of the focus area,
5912
+ # width/height of the focus area (0/0 for phase-detect modes),
5913
+ # followed by a flags word
5914
+ 7 => { # (the same for all areas in my samples, so only extract the first)
5915
+ Name => 'AFFrameSize',
5916
+ Condition => '$$self{NumAFPoints} > 0',
5917
+ Format => 'int16u[2]',
5918
+ Writable => 0,
5919
+ PrintConv => '$val=~s/ /x/; $val',
5920
+ },
5921
+ 7.1 => {
5922
+ Name => 'AFAreas',
5923
+ Format => 'int16u[7 * $val{3}]',
5924
+ Notes => q{
5925
+ X,Y position of each AF area, width, with "in-focus" for points in focus,
5926
+ "central" for the center of the selected area, or "peripheral" for points
5927
+ outside the selected area
5928
+ },
5929
+ Writable => 0,
5930
+ List => 1, # (for documentation purposes only)
5931
+ PrintConv => \&AFAreasK3III,
5932
+ },
5933
+ 11 => { # (the same for all areas in my samples, so only extract the first)
5934
+ Name => 'AFAreaSize',
5935
+ Condition => '$$self{NumAFPoints} > 0 and $$valPt !~ /^\0\0\0\0/',
5936
+ Notes => 'only for contrast-detect modes',
5937
+ Format => 'int16u[2]',
5938
+ Writable => 0,
5939
+ PrintConv => '$val=~s/ /x/; $val',
5940
+ },
5941
+ );
5942
+
5690
5943
  # white balance RGGB levels (ref 28)
5691
5944
  %Image::ExifTool::Pentax::WBLevels = (
5692
5945
  %binaryDataAttrs,
@@ -5750,7 +6003,7 @@ my %binaryDataAttrs = (
5750
6003
  },
5751
6004
  );
5752
6005
 
5753
- # lens information for Penax Q (ref PH)
6006
+ # lens information for Pentax Q (ref PH)
5754
6007
  # (306 bytes long, I wonder if this contains vignetting information too?)
5755
6008
  %Image::ExifTool::Pentax::LensInfoQ = (
5756
6009
  %binaryDataAttrs,
@@ -5824,6 +6077,14 @@ my %binaryDataAttrs = (
5824
6077
  K-500. It is currently not known where the corresponding temperature
5825
6078
  sensors are located in the camera.
5826
6079
  },
6080
+ 0x0a => { #KG
6081
+ Name => 'ShotNumber',
6082
+ Condition => '$$self{Model} =~ /K-3 Mark III/',
6083
+ # The exact same method to detect this tag with a similar set of files
6084
+ # does not reveal anything for K-1. Is this only available for K-3-III ?
6085
+ # Internal representation starts at 0 for the 1st shot
6086
+ ValueConv => '$val+1',
6087
+ },
5827
6088
  # (it would be nice to know where these temperature sensors are located,
5828
6089
  # but since according to the manual the Slow Shutter Speed NR Auto mode
5829
6090
  # is based on "internal temperature", my guess is that there must be
@@ -6461,9 +6722,9 @@ sub DecodeAFPoints($$$$;$)
6461
6722
  }
6462
6723
 
6463
6724
  #------------------------------------------------------------------------------
6464
- # Print AF Point names for K-3III (ref PH)
6725
+ # Print K-3III AF Point names (ref PH)
6465
6726
  # Inputs: 0) value, 1) ExifTool ref, 2) optional value to match
6466
- sub AFPointsK3iii($$;$)
6727
+ sub AFPointNamesK3III($$;$)
6467
6728
  {
6468
6729
  my @a = split ' ', $_[0];
6469
6730
  my $match = $_[2];
@@ -6477,10 +6738,10 @@ sub AFPointsK3iii($$;$)
6477
6738
  }
6478
6739
 
6479
6740
  #------------------------------------------------------------------------------
6480
- # Print AF point values for K-3III (ref PH)
6741
+ # Print K-3III AF point values (ref PH)
6481
6742
  # Inputs: 0) value, 1) ExifTool ref
6482
6743
  # Notes: this is experimental and not well understood
6483
- sub AFPointValues($$)
6744
+ sub AFPointValuesK3III($$)
6484
6745
  {
6485
6746
  my @a = split ' ', shift;
6486
6747
  my @vals;
@@ -6499,6 +6760,25 @@ sub AFPointValues($$)
6499
6760
  return @vals ? join ',', sort @vals : '(none)';
6500
6761
  }
6501
6762
 
6763
+ #------------------------------------------------------------------------------
6764
+ # Print K-3III AF point positions from tag 0x040c (ref KG)
6765
+ # Inputs: 0) raw value, 1) ExifTool ref
6766
+ sub AFAreasK3III($$)
6767
+ {
6768
+ my ($val, $et) = @_;
6769
+ return '(none)' unless $val;
6770
+ my @vals = split ' ', $val;
6771
+ # flags bits: [mask, value, description]
6772
+ my @flags = ([0x10,0x10,'central'],[0x08,0,'peripheral'],[0x04,0x04,'in-focus']);
6773
+ my ($i, @strs);
6774
+ for ($i=0; $i+7<=@vals; $i+=7) {
6775
+ my @a;
6776
+ ($vals[$i+6] & $$_[0]) == $$_[1] and push @a, $$_[2] foreach @flags;
6777
+ push @strs, $vals[$i+2] . ',' . $vals[$i+3] . (@a ? '(' . join(',',@a) . ')' : '');
6778
+ }
6779
+ return \@strs;
6780
+ }
6781
+
6502
6782
  #------------------------------------------------------------------------------
6503
6783
  # Convert Pentax hex-based EV (modulo 8) to real number
6504
6784
  # Inputs: 0) value to convert
@@ -18,7 +18,7 @@ use strict;
18
18
  use vars qw($VERSION);
19
19
  use Image::ExifTool qw(:DataAccess :Utils);
20
20
 
21
- $VERSION = '1.03';
21
+ $VERSION = '1.04';
22
22
 
23
23
  sub ProcessProtobuf($$$;$);
24
24
 
@@ -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.18';
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',
@@ -111,7 +111,7 @@ my %insvLimit = (
111
111
  The tags below are extracted from timed metadata in QuickTime and other
112
112
  formats of video files when the ExtractEmbedded option is used. Although
113
113
  most of these tags are combined into the single table below, ExifTool
114
- currently reads 110 different types of timed GPS metadata from video files.
114
+ currently reads 111 different types of timed GPS metadata from video files.
115
115
  },
116
116
  GPSLatitude => { PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "N")', RawConv => '$$self{FoundGPSLatitude} = 1; $val' },
117
117
  GPSLongitude => { PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "E")' },