- Timestamp:
- 2021-02-26T19:39:51+13:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/cpan/Image/ExifTool/Pentax.pm
r24107 r34921 31 31 # 16) Axel Kellner private communication (K10D) 32 32 # 17) Cvetan Ivanov private communication (K100D) 33 # 18) http:// www.gvsoft.homedns.org/exif/makernote-pentax-type3.html33 # 18) http://gvsoft.homedns.org/exif/makernote-pentax-type3.html 34 34 # 19) Dave Nicholson private communication (K10D) 35 35 # 20) Bogdan and yeryry (http://www.cpanforum.com/posts/8037) … … 38 38 # 23) Akos Szalkai (https://rt.cpan.org/Ticket/Display.html?id=43743) 39 39 # 24) Albert Bogner private communication 40 # 25) Niels Kristian Bech Jensen private communication 40 # 26) https://exiftool.org/forum/index.php/topic,3444.0.html 41 # 27) https://exiftool.org/forum/index.php/topic,3833.0.html 42 # 28) Klaus Homeister https://exiftool.org/forum/index.php/topic,4803.0.html 43 # 29) Louis Granboulan private communication (K-5II) 44 # 30) https://exiftool.org/forum/index.php?topic=5433 45 # 31) Andras Salamon private communication (K-70) 46 # IB) Iliah Borg private communication (LibRaw) 41 47 # JD) Jens Duttke private communication 48 # NJ) Niels Kristian Bech Jensen private communication 42 49 # 43 50 # Notes: See POD documentation at the bottom of this file … … 47 54 48 55 use strict; 49 use vars qw($VERSION );56 use vars qw($VERSION %pentaxLensTypes); 50 57 use Image::ExifTool::Exif; 58 use Image::ExifTool::GPS; 51 59 use Image::ExifTool::HP; 52 60 53 $VERSION = ' 2.30';61 $VERSION = '3.36'; 54 62 55 63 sub CryptShutterCount($$); 56 64 sub PrintFilter($$$); 65 sub DecodeAFPoints($$$$;$); 57 66 58 67 # pentax lens type codes (ref 4) 59 68 # The first number gives the lens series, and the 2nd gives the model number 60 69 # Series numbers: K=1; A=2; F=3; FAJ=4; DFA=4,7; FA=3,4,5,6; FA*=5,6; 61 # DA=3,4,7; DA*=7,8; FA645=11; DFA645=13 62 my%pentaxLensTypes = (70 # DA=3,4,7; DA*=7,8; FA645=11; DFA645=13; Q=21 71 %pentaxLensTypes = ( 63 72 Notes => q{ 64 73 The first number gives the series of the lens, and the second identifies the 65 74 lens model. Note that newer series numbers may not always be properly 66 identified by cameras running older firmware versions. Decimal values 67 differentiate lenses which would otherwise have the same LensType, and are 68 used by the Composite LensID tag when attempting to identify the specific 69 lens model. 75 identified by cameras running older firmware versions. Decimal values have 76 been added to differentiate lenses which would otherwise have the same 77 LensType, and are used by the Composite LensID tag when attempting to 78 identify the specific lens model. 79 }, 80 OTHER => sub { 81 my ($val, $inv, $conv) = @_; 82 return undef if $inv; 83 # *istD may report a series number of 4 for series 7 lenses 84 $val =~ s/^4 /7 / and $$conv{$val} and return "$$conv{$val} ($_[0])"; 85 # cameras that don't recognize SDM lenses (eg. older K10 firmware) 86 # may report series 7 instead of 8 87 $val =~ s/^7 /8 / and $$conv{$val} and return "$$conv{$val} ? ($_[0])"; 88 # there seems to some inconsistency between FA and DFA lenses for the 645D... 89 ($val =~ s/^11 /13 / or $val =~ s/^13 /11 /) and $$conv{$val} and return "$$conv{$val} ? ($_[0])"; 90 return undef; 70 91 }, 71 92 '0 0' => 'M-42 or No Lens', #17 72 93 '1 0' => 'K or M Lens', 73 94 '2 0' => 'A Series Lens', #7 (from smc PENTAX-A 400mm F5.6) 74 '3 0' => 'Sigma', # (includes 'Sigma 30mm F1.4 EX DC' - PH) 75 '3 17' => 'smc PENTAX-FA SOFT 85mm F2.8', 95 '3 0' => 'Sigma', 96 # (and 'Sigma 18-50mm F2.8 EX Macro') 97 # (and 'Sigma 30mm F1.4 EX DC', ref PH) 98 # (and 'Sigma 50-500mm F4-6.3 DG APO') 99 # (and 'Sigma 70mm F2.8 EX DG Macro') 100 # (and 'Sigma 105mm F2.8 EX DG Macro', ref 24) 101 # (and 'Sigma 180mm F4.5 EX DG Macro') 102 '3 17' => 'smc PENTAX-FA SOFT 85mm F2.8', # (also F version, ref 29) 76 103 '3 18' => 'smc PENTAX-F 1.7X AF ADAPTER', 77 104 '3 19' => 'smc PENTAX-F 24-50mm F4', … … 82 109 '3 23.1' => 'Sigma AF 28-300mm F3.5-5.6 DL IF', #JD 83 110 '3 23.2' => 'Sigma AF 28-300mm F3.5-6.3 DG IF Macro', #JD 111 '3 23.3' => 'Tokina 80-200mm F2.8 ATX-Pro', #Exiv2 84 112 '3 24' => 'smc PENTAX-F 35-135mm F3.5-4.5', 85 113 '3 25' => 'smc PENTAX-F 35-105mm F4-5.6 or Sigma or Tokina Lens', 86 '3 25.1' => 'Sigma AF 28-300mm F3.5-5.6 DL IF', #1187 '3 25.2' => 'Sigma 55-200mm F4-5.6 DC', #JD88 '3 25.3' => 'Sigma AF 28-300mm F3.5- 5.6 DL IF', #JD114 '3 25.1' => 'Sigma 55-200mm F4-5.6 DC', #JD 115 '3 25.2' => 'Sigma AF 28-300mm F3.5-5.6 DL IF', #11 116 '3 25.3' => 'Sigma AF 28-300mm F3.5-6.3 DL IF', #Exiv2 89 117 '3 25.4' => 'Sigma AF 28-300mm F3.5-6.3 DG IF Macro', #JD 90 118 '3 25.5' => 'Tokina 80-200mm F2.8 ATX-Pro', #12 … … 94 122 '3 28' => 'smc PENTAX-F 35-70mm F3.5-4.5 or Tokina Lens', 95 123 '3 28.1' => 'Tokina 19-35mm F3.5-4.5 AF', #12 124 '3 28.2' => 'Tokina AT-X AF 400mm F5.6', #NJ 96 125 '3 29' => 'PENTAX-F 28-80mm F3.5-4.5 or Sigma or Tokina Lens', 97 126 '3 29.1' => 'Sigma AF 18-125mm F3.5-5.6 DC', #11 … … 111 140 '3 41' => 'smc PENTAX-F Macro 50mm F2.8 or Sigma Lens', #4 112 141 '3 41.1' => 'Sigma 50mm F2.8 Macro', #16 142 '3 42' => 'Sigma 300mm F2.8 EX DG APO IF', #27 113 143 '3 44' => 'Sigma or Tamron Lens (3 44)', 114 144 '3 44.1' => 'Sigma AF 10-20mm F4-5.6 EX DC', #JD 115 '3 44.2' => 'Sigma 12-24mm F4.5 EX DG', #12145 '3 44.2' => 'Sigma 12-24mm F4.5-5.6 EX DG', #12 (added "-5.6", ref 29) 116 146 '3 44.3' => 'Sigma 17-70mm F2.8-4.5 DC Macro', #(Bart Hickman) 117 147 '3 44.4' => 'Sigma 18-50mm F3.5-5.6 DC', #4 118 '3 44.5' => 'Tamron 35-90mm F4 AF', #12 119 '3 46' => 'Sigma Lens (3 46)', 148 '3 44.5' => 'Sigma 17-35mm F2.8-4 EX DG', #29 149 '3 44.6' => 'Tamron 35-90mm F4-5.6 AF', #12 (added "-5.6", ref IB) 150 '3 44.7' => 'Sigma AF 18-35mm F3.5-4.5 Aspherical', #29 151 '3 46' => 'Sigma or Samsung Lens (3 46)', 120 152 '3 46.1' => 'Sigma APO 70-200mm F2.8 EX', 121 153 '3 46.2' => 'Sigma EX APO 100-300mm F4 IF', #JD 154 '3 46.3' => 'Samsung/Schneider D-XENON 50-200mm F4-5.6 ED', #29 122 155 '3 50' => 'smc PENTAX-FA 28-70mm F4 AL', 123 156 '3 51' => 'Sigma 28mm F1.8 EX DG Aspherical Macro', … … 141 174 '3 255.7' => 'Sigma 70-300mm F4-5.6 Macro', #JD 142 175 '3 255.8' => 'Sigma 55-200mm F4-5.6 DC', #JD 143 '3 255.9' => 'Sigma 18-50mm F2.8 EX DC', #JD 176 '3 255.9' => 'Sigma 18-50mm F2.8 EX DC', #JD (also Macro version - PH) 144 177 '4 1' => 'smc PENTAX-FA SOFT 28mm F2.8', 145 178 '4 2' => 'smc PENTAX-FA 80-320mm F4.5-5.6', 146 179 '4 3' => 'smc PENTAX-FA 43mm F1.9 Limited', 147 180 '4 6' => 'smc PENTAX-FA 35-80mm F4-5.6', 181 '4 8' => 'Irix 150mm F2.8 Macro', #exiv2 issue 1084 182 '4 9' => 'Irix 11mm F4 Firefly', #27 183 '4 10' => 'Irix 15mm F2.4', #27 148 184 '4 12' => 'smc PENTAX-FA 50mm F1.4', #17 149 185 '4 15' => 'smc PENTAX-FA 28-105mm F4-5.6 [IF]', … … 163 199 '4 34' => 'smc PENTAX-FA 24-90mm F3.5-4.5 AL[IF]', 164 200 '4 35' => 'smc PENTAX-FA 100-300mm F4.7-5.8', 165 '4 36' => 'Tamron AF70-300mm F4-5.6 LD Macro', # both 572D and A17 (Di) - ref JD 201 # '4 36' => 'Tamron AF70-300mm F4-5.6 LD Macro', # both 572D and A17 (Di) - ref JD 202 '4 36' => 'Tamron AF 70-300mm F4-5.6 LD Macro 1:2', #NJ 166 203 '4 37' => 'Tamron SP AF 24-135mm F3.5-5.6 AD AL (190D)', #13 167 204 '4 38' => 'smc PENTAX-FA 28-105mm F3.2-4.5 AL[IF]', … … 175 212 '4 46' => 'smc PENTAX-FA J 28-80mm F3.5-5.6 AL', 176 213 '4 47' => 'smc PENTAX-FA J 18-35mm F4-5.6 AL', 177 '4 49' => 'Tamron SP AF 28-75mm F2.8 XR Di (A09)', 214 #'4 49' => 'Tamron SP AF 28-75mm F2.8 XR Di (A09)', 215 '4 49' => 'Tamron SP AF 28-75mm F2.8 XR Di LD Aspherical [IF] Macro', #NJ 178 216 '4 51' => 'smc PENTAX-D FA 50mm F2.8 Macro', 179 217 '4 52' => 'smc PENTAX-D FA 100mm F2.8 Macro', 218 '4 55' => 'Samsung/Schneider D-XENOGON 35mm F2', #29 219 '4 56' => 'Samsung/Schneider D-XENON 100mm F2.8 Macro', #Alan Robinson 180 220 '4 75' => 'Tamron SP AF 70-200mm F2.8 Di LD [IF] Macro (A001)', #JD 221 '4 214' => 'smc PENTAX-DA 35mm F2.4 AL', #PH 181 222 '4 229' => 'smc PENTAX-DA 18-55mm F3.5-5.6 AL II', #JD 182 223 '4 230' => 'Tamron SP AF 17-50mm F2.8 XR Di II', #20 183 224 '4 231' => 'smc PENTAX-DA 18-250mm F3.5-6.3 ED AL [IF]', #21 184 225 '4 237' => 'Samsung/Schneider D-XENOGON 10-17mm F3.5-4.5', #JD 185 '4 239' => 'Samsung D-XENON 12-24mm F4 ED AL [IF]', #23 226 '4 239' => 'Samsung/Schneider D-XENON 12-24mm F4 ED AL [IF]', #23 227 '4 242' => 'smc PENTAX-DA* 16-50mm F2.8 ED AL [IF] SDM (SDM unused)', #Pietu Pohjalainen 186 228 '4 243' => 'smc PENTAX-DA 70mm F2.4 Limited', #JD 187 229 '4 244' => 'smc PENTAX-DA 21mm F3.2 AL Limited', #9 188 '4 245' => 'S chneider D-XENON 50-200mm F4-5.6', #15189 '4 246' => 'S chneider D-XENON 18-55mm F3.5-5.6', #15230 '4 245' => 'Samsung/Schneider D-XENON 50-200mm F4-5.6', #15 231 '4 246' => 'Samsung/Schneider D-XENON 18-55mm F3.5-5.6', #15 190 232 '4 247' => 'smc PENTAX-DA FISH-EYE 10-17mm F3.5-4.5 ED[IF]', #10 191 233 '4 248' => 'smc PENTAX-DA 12-24mm F4 ED AL [IF]', #10 … … 228 270 '7 58' => 'smc PENTAX-D FA Macro 100mm F2.8 WR', #PH - this bit of information cost me $600 ;) 229 271 '7 75' => 'Tamron SP AF 70-200mm F2.8 Di LD [IF] Macro (A001)', #(Anton Bondar) 272 '7 201' => 'smc Pentax-DA L 50-200mm F4-5.6 ED WR', #(Bruce Rusk) 273 '7 202' => 'smc PENTAX-DA L 18-55mm F3.5-5.6 AL WR', #29 274 '7 203' => 'HD PENTAX-DA 55-300mm F4-5.8 ED WR', #29 275 '7 204' => 'HD PENTAX-DA 15mm F4 ED AL Limited', #forum5318 276 '7 205' => 'HD PENTAX-DA 35mm F2.8 Macro Limited', #29 277 '7 206' => 'HD PENTAX-DA 70mm F2.4 Limited', #29 278 '7 207' => 'HD PENTAX-DA 21mm F3.2 ED AL Limited', #forum5327 279 '7 208' => 'HD PENTAX-DA 40mm F2.8 Limited', #PH 280 '7 212' => 'smc PENTAX-DA 50mm F1.8', #PH 281 '7 213' => 'smc PENTAX-DA 40mm F2.8 XS', #PH 230 282 '7 214' => 'smc PENTAX-DA 35mm F2.4 AL', #PH 231 283 '7 216' => 'smc PENTAX-DA L 55-300mm F4-5.8 ED', #PH … … 235 287 '7 221' => 'smc PENTAX-DA L 50-200mm F4-5.6 ED', #Ar't 236 288 '7 222' => 'smc PENTAX-DA L 18-55mm F3.5-5.6', #PH (tag 0x003f -- was '7 229' in LensInfo of one test image) 237 '7 223' => 'Samsung D-XENON 18-55mm F3.5-5.6 II', #PH289 '7 223' => 'Samsung/Schneider D-XENON 18-55mm F3.5-5.6 II', #PH 238 290 '7 224' => 'smc PENTAX-DA 15mm F4 ED AL Limited', #JD 239 '7 225' => 'Samsung D-XENON 18-250mm F3.5-6.3', #8/PH291 '7 225' => 'Samsung/Schneider D-XENON 18-250mm F3.5-6.3', #8/PH 240 292 '7 226' => 'smc PENTAX-DA* 55mm F1.4 SDM (SDM unused)', #PH (NC) 241 '7 227' => 'smc PENTAX DA* 60-250mm F4 [IF] SDM (SDM unused)', #PH (NC) 293 '7 227' => 'smc PENTAX-DA* 60-250mm F4 [IF] SDM (SDM unused)', #PH (NC) 294 '7 228' => 'Samsung 16-45mm F4 ED', #29 242 295 '7 229' => 'smc PENTAX-DA 18-55mm F3.5-5.6 AL II', #JD 243 296 '7 230' => 'Tamron AF 17-50mm F2.8 XR Di-II LD (Model A16)', #JD … … 252 305 '7 243' => 'smc PENTAX-DA 70mm F2.4 Limited', #PH 253 306 '7 244' => 'smc PENTAX-DA 21mm F3.2 AL Limited', #16 307 '8 0' => 'Sigma 50-150mm F2.8 II APO EX DC HSM', #forum2997 308 '8 3' => 'Sigma 18-125mm F3.8-5.6 DC HSM', #forum10167 309 '8 4' => 'Sigma 50mm F1.4 EX DG HSM', #Artur private communication 310 '8 6' => 'Sigma 4.5mm F2.8 EX DC Fisheye', #IB 311 '8 7' => 'Sigma 24-70mm F2.8 IF EX DG HSM', #Exiv2 312 '8 8' => 'Sigma 18-250mm F3.5-6.3 DC OS HSM', #27 313 '8 11' => 'Sigma 10-20mm F3.5 EX DC HSM', #27 314 '8 12' => 'Sigma 70-300mm F4-5.6 DG OS', #forum3382 315 '8 13' => 'Sigma 120-400mm F4.5-5.6 APO DG OS HSM', #26 254 316 '8 14' => 'Sigma 17-70mm F2.8-4.0 DC Macro OS HSM', #(Hubert Meier) 255 '8 18' => 'Sigma 8-16mm F4.5-5.6 DC HSM', #http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,2998.0.html 317 '8 15' => 'Sigma 150-500mm F5-6.3 APO DG OS HSM', #26 318 '8 16' => 'Sigma 70-200mm F2.8 EX DG Macro HSM II', #26 319 '8 17' => 'Sigma 50-500mm F4.5-6.3 DG OS HSM', #(Heike Herrmann) (also APO, ref 26) 320 '8 18' => 'Sigma 8-16mm F4.5-5.6 DC HSM', #forum2998 321 '8 20' => 'Sigma 18-50mm F2.8-4.5 DC HSM', #IB 322 '8 21' => 'Sigma 17-50mm F2.8 EX DC OS HSM', #26 323 '8 22' => 'Sigma 85mm F1.4 EX DG HSM', #26 324 '8 23' => 'Sigma 70-200mm F2.8 APO EX DG OS HSM', #27 325 '8 24' => 'Sigma 17-70mm F2.8-4 DC Macro OS HSM', #27 326 '8 25' => 'Sigma 17-50mm F2.8 EX DC HSM', #Exiv2 327 '8 27' => 'Sigma 18-200mm F3.5-6.3 II DC HSM', #27 328 '8 28' => 'Sigma 18-250mm F3.5-6.3 DC Macro HSM', #27 329 '8 29' => 'Sigma 35mm F1.4 DG HSM', #27 330 '8 30' => 'Sigma 17-70mm F2.8-4 DC Macro HSM | C', #27 331 '8 31' => 'Sigma 18-35mm F1.8 DC HSM', #27 332 '8 32' => 'Sigma 30mm F1.4 DC HSM | A', #27 333 '8 33' => 'Sigma 18-200mm F3.5-6.3 DC Macro HSM', #DieterPearcey (C014) 334 '8 34' => 'Sigma 18-300mm F3.5-6.3 DC Macro HSM', #NJ 335 '8 59' => 'HD PENTAX-D FA 150-450mm F4.5-5.6 ED DC AW', #29 336 '8 60' => 'HD PENTAX-D FA* 70-200mm F2.8 ED DC AW', #29 337 '8 61' => 'HD PENTAX-D FA 28-105mm F3.5-5.6 ED DC WR', #PH 338 '8 62' => 'HD PENTAX-D FA 24-70mm F2.8 ED SDM WR', #PH 339 '8 63' => 'HD PENTAX-D FA 15-30mm F2.8 ED SDM WR', #PH 340 '8 64' => 'HD PENTAX-D FA* 50mm F1.4 SDM AW', #27 341 '8 65' => 'HD PENTAX-D FA 70-210mm F4 ED SDM WR', #PH 342 '8 66' => 'HD PENTAX-D FA 85mm F1.4 ED SDM AW', #James O'Neill 343 '8 196' => 'HD PENTAX-DA* 11-18mm F2.8 ED DC AW', #29 344 '8 197' => 'HD PENTAX-DA 55-300mm F4.5-6.3 ED PLM WR RE', #29 345 '8 198' => 'smc PENTAX-DA L 18-50mm F4-5.6 DC WR RE', #29 346 '8 199' => 'HD PENTAX-DA 18-50mm F4-5.6 DC WR RE', #29 347 '8 200' => 'HD PENTAX-DA 16-85mm F3.5-5.6 ED DC WR', #29 348 '8 209' => 'HD PENTAX-DA 20-40mm F2.8-4 ED Limited DC WR', #29 349 '8 210' => 'smc PENTAX-DA 18-270mm F3.5-6.3 ED SDM', #Helmut Schutz 350 '8 211' => 'HD PENTAX-DA 560mm F5.6 ED AW', #PH 256 351 '8 215' => 'smc PENTAX-DA 18-135mm F3.5-5.6 ED AL [IF] DC WR', #PH 257 352 '8 226' => 'smc PENTAX-DA* 55mm F1.4 SDM', #JD 258 '8 227' => 'smc PENTAX 353 '8 227' => 'smc PENTAX-DA* 60-250mm F4 [IF] SDM', #JD 259 354 '8 232' => 'smc PENTAX-DA 17-70mm F4 AL [IF] SDM', #JD 260 355 '8 234' => 'smc PENTAX-DA* 300mm F4 ED [IF] SDM', #19 … … 264 359 '8 255' => 'Sigma Lens (8 255)', 265 360 '8 255.1' => 'Sigma 70-200mm F2.8 EX DG Macro HSM II', #JD 266 '8 255.2' => 'Sigma APO 150-500mm F5-6.3 DG OS HSM', #JD 267 '8 255.3' => 'Sigma 50-150mm F2.8 II APO EX DC HSM', #http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,2997.0.html 361 '8 255.2' => 'Sigma 150-500mm F5-6.3 DG APO [OS] HSM', #JD (non-OS version has same type, ref 29) 362 '8 255.3' => 'Sigma 50-150mm F2.8 II APO EX DC HSM', #forum2997 363 '8 255.4' => 'Sigma 4.5mm F2.8 EX DC HSM Circular Fisheye', #PH 364 '8 255.5' => 'Sigma 50-200mm F4-5.6 DC OS', #26 365 '8 255.6' => 'Sigma 24-70mm F2.8 EX DG HSM', #29 366 # 367 # 645 lenses 368 # 369 '9 0' => '645 Manual Lens', #PH (NC) 370 '10 0' => '645 A Series Lens', #PH 371 '11 1' => 'smc PENTAX-FA 645 75mm F2.8', #PH 372 '11 2' => 'smc PENTAX-FA 645 45mm F2.8', #PH 373 '11 3' => 'smc PENTAX-FA* 645 300mm F4 ED [IF]', #PH 268 374 '11 4' => 'smc PENTAX-FA 645 45-85mm F4.5', #PH 375 '11 5' => 'smc PENTAX-FA 645 400mm F5.6 ED [IF]', #PH 376 '11 7' => 'smc PENTAX-FA 645 Macro 120mm F4', #PH 269 377 '11 8' => 'smc PENTAX-FA 645 80-160mm F4.5', #PH 378 '11 9' => 'smc PENTAX-FA 645 200mm F4 [IF]', #PH 379 '11 10' => 'smc PENTAX-FA 645 150mm F2.8 [IF]', #PH 270 380 '11 11' => 'smc PENTAX-FA 645 35mm F3.5 AL [IF]', #PH 381 '11 12' => 'smc PENTAX-FA 645 300mm F5.6 ED [IF]', #29 382 '11 14' => 'smc PENTAX-FA 645 55-110mm F5.6', #PH 383 '11 16' => 'smc PENTAX-FA 645 33-55mm F4.5 AL', #PH 271 384 '11 17' => 'smc PENTAX-FA 645 150-300mm F5.6 ED [IF]', #PH 385 '11 21' => 'HD PENTAX-D FA 645 35mm F3.5 AL [IF]', #29 272 386 '13 18' => 'smc PENTAX-D FA 645 55mm F2.8 AL [IF] SDM AW', #PH 387 '13 19' => 'smc PENTAX-D FA 645 25mm F4 AL [IF] SDM AW', #PH 388 '13 20' => 'HD PENTAX-D FA 645 90mm F2.8 ED AW SR', #PH 389 '13 253' => 'HD PENTAX-DA 645 28-45mm F4.5 ED AW SR', #Dominique Schrekling email 390 '13 254' => 'smc PENTAX-DA 645 25mm F4 AL [IF] SDM AW', #forum8253 391 # 392 # Q-mount lenses (21=auto focus lens, 22=manual focus) 393 # 394 '21 0' => 'Pentax Q Manual Lens', #PH 395 '21 1' => '01 Standard Prime 8.5mm F1.9', #PH 396 '21 2' => '02 Standard Zoom 5-15mm F2.8-4.5', #PH 397 '22 3' => '03 Fish-eye 3.2mm F5.6', #PH 398 '22 4' => '04 Toy Lens Wide 6.3mm F7.1', #PH 399 '22 5' => '05 Toy Lens Telephoto 18mm F8', #PH 400 '21 6' => '06 Telephoto Zoom 15-45mm F2.8', #PH 401 '21 7' => '07 Mount Shield 11.5mm F9', #PH (NC) 402 '21 8' => '08 Wide Zoom 3.8-5.9mm F3.7-4', #PH (NC) 403 '21 233' => 'Adapter Q for K-mount Lens', #29 404 # 405 # Ricoh lenses 406 # 407 '31 1' => 'GR Lens', #PH (GR III 28mm F2.8) 273 408 ); 274 409 … … 327 462 0x12c3c => 'Optio W20', 328 463 0x12c46 => 'Optio A20', 329 0x12c8c => 'Optio M30',330 464 0x12c78 => 'Optio E30', 331 465 0x12c7d => 'Optio E35', 332 466 0x12c82 => 'Optio T30', 467 0x12c8c => 'Optio M30', 333 468 0x12c91 => 'Optio L30', 334 469 0x12c96 => 'Optio W30', … … 373 508 0x12e6c => 'K-r', 374 509 0x12e76 => 'K-5', 375 0x12e8a => 'Optio RS1000 /RS1500',510 0x12e8a => 'Optio RS1000/RS1500', 376 511 0x12e94 => 'Optio RZ10', 512 0x12e9e => 'Optio LS1000', 377 513 0x12ebc => 'Optio WG-1 GPS', 514 0x12ed0 => 'Optio S1', 515 0x12ee4 => 'Q', 516 0x12ef8 => 'K-01', 517 0x12f0c => 'Optio RZ18', 518 0x12f16 => 'Optio VS20', 519 0x12f2a => 'Optio WG-2 GPS', 520 0x12f48 => 'Optio LS465', 521 0x12f52 => 'K-30', 522 0x12f5c => 'X-5', 523 0x12f66 => 'Q10', 524 0x12f70 => 'K-5 II', 525 0x12f71 => 'K-5 II s', #forum4515 526 0x12f7a => 'Q7', 527 0x12f84 => 'MX-1', 528 0x12f8e => 'WG-3 GPS', 529 0x12f98 => 'WG-3', 530 0x12fa2 => 'WG-10', 531 0x12fb6 => 'K-50', 532 0x12fc0 => 'K-3', #29 533 0x12fca => 'K-500', 534 0x12fe8 => 'WG-4', # (Ricoh) 535 0x12fde => 'WG-4 GPS', # (Ricoh) 536 0x13006 => 'WG-20', # (Ricoh) 537 0x13010 => '645Z', 538 0x1301a => 'K-S1', 539 0x13024 => 'K-S2', #29 (Ricoh) 540 0x1302e => 'Q-S1', 541 0x13056 => 'WG-30', # (Ricoh) 542 0x1307e => 'WG-30W', # (Ricoh) 543 0x13088 => 'WG-5 GPS', # (Ricoh) 544 0x13092 => 'K-1', #IB (Ricoh) 545 0x1309c => 'K-3 II', #29 (Ricoh) 546 0x131f0 => 'WG-M2', # (Ricoh) 547 0x1320e => 'GR III', # (Ricoh) 548 0x13222 => 'K-70', #29 (Ricoh) 549 0x1322c => 'KP', #29 (Ricoh) 550 0x13240 => 'K-1 Mark II', # (Ricoh) 551 0x13290 => 'WG-70', # (Ricoh) 378 552 ); 379 553 … … 384 558 2 => 'Anchorage', 385 559 3 => 'Vancouver', 386 4 => 'San Fran sisco',560 4 => 'San Francisco', 387 561 5 => 'Los Angeles', 388 562 6 => 'Calgary', … … 451 625 69 => 'Stockholm', 452 626 70 => 'Lisbon', #14 453 71 => 'Copenhagen', # 25627 71 => 'Copenhagen', #NJ 454 628 72 => 'Warsaw', 455 629 73 => 'Prague', … … 489 663 18 => 'Posterization', 490 664 19 => 'Sketch Filter', 665 20 => 'Shading', # (Q) 666 21 => 'Invert Color', # (Q) 667 23 => 'Tone Expansion', #Forum5247 668 27 => 'Unicolor Bold', #31 669 28 => 'Bold Monochrome', #31 670 29 => 'Replace Color', #31 491 671 254 => 'Custom Filter', 492 672 }, … … 506 686 9 => ['Color', { 1=>'Red',2=>'Magenta',3=>'Blue',4=>'Cyan',5=>'Green',6=>'Yellow' }], # Color Filter 507 687 10 => ['Density', { 1=>'Light',2=>'Standard',3=>'Dark' }], # Color Filter 508 11 => ['ExtractedColor',{ 0=>'Off',1=>'Red',2=>'Magenta',3=>'Blue',4=>'Cyan',5=>'Green',6=>'Yellow' }], # Extract Color [x2]509 12 => ['ColorRange', '%+d'], # Extract Color [x2] (-2-+2)688 11 => ['ExtractedColor',{ 0=>'Off',1=>'Red',2=>'Magenta',3=>'Blue',4=>'Cyan',5=>'Green',6=>'Yellow' }], # Extract Color [x2] 689 12 => ['ColorRange', '%+d'], # Extract Color [x2] (-2-+2) 510 690 13 => ['FilterEffect', { 0=>'Off',1=>'Red',2=>'Green',3=>'Blue',4=>'Infrared'}], # Monochrome 511 691 14 => ['ToningBA', '%+d'], # Monochrome (-3-+3) 512 15 => ['InvertColor', { 0=>'Off',1=>'On' }], # Custom 692 15 => ['InvertColor', { 0=>'Off',1=>'On' }], # Custom/Invert Color 513 693 16 => ['Slim', '%+d'], # Slim (-8-+8) 514 694 17 => ['EffectDensity', { 1=>'Sparse',2=>'Normal',3=>'Dense' }], # Starburst … … 518 698 21 => ['DistortionType', '%d'], # Custom (1-3) 519 699 22 => ['DistortionLevel',{0=>'Off',1=>'Weak',2=>'Medium',3=>'Strong' }], #Custom 520 23 => ['ShadingType', '%d'], # Custom (1-6)521 24 => ['ShadingLevel', '%+d'], # Custom (-3-+3)700 23 => ['ShadingType', '%d'], # Custom/Shading (1-6) 701 24 => ['ShadingLevel', '%+d'], # Custom/Shading (-3-+3) 522 702 25 => ['Shading', '%d'], # Toy Camera (1-3) 523 703 26 => ['Blur', '%d'], # Toy Camera (1-3) … … 529 709 32 => ['Saturation2', { 0=>'Off',1=>'Low',2=>'Medium',3=>'High' }], # Water Color 530 710 33 => ['HDR', { 1=>'Weak',2=>'Medium',3=>'Strong' }], # HDR 711 # (34 missing) 531 712 35 => ['FocusPlane', '%+d'], # Miniature (-3-+3) 532 713 36 => ['FocusWidth', { 1=>'Narrow',2=>'Middle',3=>'Wide' }], # Miniature … … 537 718 41 => ['Contrast2', { 1=>'Low',2=>'Medium',3=>'High'}], # Sketch Filter 538 719 42 => ['ScratchEffect', { 0=>'Off',1=>'On' }], # Sketch Filter 720 45 => ['ToneExpansion', { 1=>'Low',2=>'Medium',3=>'High' }], # Tone Expansion (ref Forum5247) 721 47 => ['UnicolorBold', { 1=>'Red',2=>'Magenta',3=>'Blue',4=>'Cyan',5=>'Green',6=>'Yellow' }], #31 Unicolor Bold 722 48 => ['BoldMonochrome', '%d'], #31 Bold Monochrome (1-3) 723 49 => ['OriginalColor', { 1=>'Red',2=>'Magenta',3=>'Blue',4=>'Cyan',5=>'Green',6=>'Yellow' }], #31 Replace Color 724 50 => ['NewColor', { 1=>'Red',2=>'Magenta',3=>'Blue',4=>'Cyan',5=>'Green',6=>'Yellow' }], #31 Replace Color 725 51 => ['ColorScale', '%d'], #31 Replace Color (1-5) 726 52 => ['Toning2', '%+d'], #31 Extract Color (-3-+3) 539 727 ); 540 728 … … 578 766 PrintConvInv => 'hex($val)', 579 767 ); 768 769 # conversions for tags 0x0053-0x005a 770 my %colorTemp = ( 771 Writable => 'undef', 772 Count => 4, 773 ValueConv => sub { 774 my $val = shift; 775 return $val unless length $val == 4; 776 my @a = unpack 'nCC', $val; 777 $a[0] = 53190 - $a[0]; 778 $a[1] = ($a[2] & 0x0f); $a[1] -= 16 if $a[1] >= 8; 779 $a[2] = ($a[2] >> 4); $a[2] -= 16 if $a[2] >= 8; 780 return "@a"; 781 }, 782 ValueConvInv => sub { 783 my $val = shift; 784 my @a = split ' ', $val; 785 return undef unless @a == 3; 786 return pack 'nCC', 53190 - $a[0], 0, ($a[1] & 0x0f) + (($a[2] & 0x0f) << 4); 787 }, 788 PrintConv => sub { 789 $_ = shift; 790 s/ ([1-9])/ +$1/g; 791 s/ 0/ 0/g; 792 return $_; 793 }, 794 PrintConvInv => '$val', 795 ); 796 797 # conversions for KelvinWB tags 798 my %kelvinWB = ( 799 Format => 'int16u[4]', 800 ValueConv => sub { 801 my @a = split ' ', shift; 802 (53190 - $a[0]) . ' ' . $a[1] . ' ' . ($a[2] / 8192) . ' ' . ($a[3] / 8192); 803 }, 804 ValueConvInv => sub { 805 my @a = split ' ', shift; 806 (53190 - $a[0]) . ' ' . $a[1] . ' ' . int($a[2]*8192+0.5) . ' ' . int($a[3]*8192+0.5); 807 }, 808 ); 809 810 my %noYes = ( 0 => 'No', 1 => 'Yes' ); 580 811 581 812 # common attributes for writable BinaryData directories … … 600 831 PrintConv => '$val=~tr/ /./; $val', 601 832 PrintConvInv => '$val=~tr/./ /; $val', 833 # 0.1.0.3 - PENTAX Optio E40 834 # 3.0.0.0 - K10D 835 # 3.1.0.0 - Optio A40/S10/L36/L40/M40/V10 836 # 3.1.1.0 - Optio L36/L40/M40/V10 837 # 3.1.2.0 - Optio Z10 838 # 4.0.2.0 - Optio E50 839 # 4.1.0.0 - Optio S12 840 # 4.1.1.0 - Optio M50 841 # 4.1.2.0 - K20D, K200D 842 # 4.2.0.0 - Optio L50/V20 843 # 4.2.1.0 - Optio E60/M90 844 # 4.2.2.0 - Optio W60 845 # 4.2.3.0 - Optio M60 846 # 4.4.0.1 - K-m, K2000 847 # 4.5.0.0 - Optio E70/L70 848 # 4.5.0.0 - Optio E70/L70/P70 849 # 4.6.0.0 - Optio E80/E90/W80 850 # 5.0.0.0 - K-7, Optio P80/WS80 851 # 5.1.0.0 - K-x 852 # 5.2.0.0 - Optio I-10 853 # 5.3.0.0 - Optio H90 854 # 5.3.2.0 - Optio W90/X90 855 # 6.0.0.0 - K-r, 645D 856 # 6.1.3.0 - Optio LS1000/RS1000/RS1500/RZ10 857 # 7.0.0.0 - K-5 858 # 7.1.0.0 - Optio WG-1GPS/WG-10/WG-20 859 # 7.2.0.0 - Optio S1 860 # 8.0.0.0 - Q 861 # 8.0.1.0 - Optio RZ18 862 # 8.0.4.0 - Optio VS20 863 # 8.1.0.0 - Optio LS465/WG-2GPS 864 # 9.0.0.0 - K-01 865 # 9.1.2.0 - X-5 866 # 10.0.0.0 - K-30, K-50, K-500, K-5 II, K-5 II s 867 # 10.0.2.0 - Q10 868 # 10.2.0.0 - WG-3/WG-4 869 # 10.2.1.0 - MX-1 870 # 10.4.1.0 - WG-3/4/5 GPS, WG-30/30W 871 # 10.6.1.0 - Q-S1, Q7 872 # 11.0.0.0 - K-3 873 # 11.2.1.0 - 645Z 874 # 11.3.0.0 - K-S1 875 # 11.5.0.0 - K-S2 876 # 11.6.1.0 - K-3 II 877 # 11.7.5.0 - WG-M2 878 # 12.0.0.0 - K-1 879 # 12.1.3.0 - K-70 880 # 12.1.5.0 - KP 602 881 }, 603 882 0x0001 => { #PH … … 612 891 Count => 2, 613 892 PrintConv => '$val =~ tr/ /x/; $val', 893 PrintConvInv => '$val =~ tr/x/ /; $val', 614 894 }, 615 895 0x0003 => { #PH … … 619 899 Groups => { 2 => 'Image' }, 620 900 Writable => 'int32u', 901 WriteGroup => 'MakerNotes', 621 902 Protected => 2, 622 903 }, … … 624 905 Name => 'PreviewImageStart', 625 906 IsOffset => 2, # code to use original base 626 Protected => 2,627 907 OffsetPair => 0x0003, # point to associated byte count 628 908 DataTag => 'PreviewImage', 629 909 Groups => { 2 => 'Image' }, 630 910 Writable => 'int32u', 911 WriteGroup => 'MakerNotes', 912 Protected => 2, 631 913 }, 632 914 0x0005 => { #13 … … 635 917 PrintHex => 1, 636 918 SeparateTable => 1, 919 DataMember => 'PentaxModelID', 920 RawConv => '$$self{PentaxModelID} = $val', 637 921 PrintConv => \%pentaxModelID, 638 922 }, … … 679 963 4 => 'RAW', #5 680 964 5 => 'Premium', #PH (K20D) 965 7 => 'RAW (pixel shift enabled)', #forum6536 (K-3 II) 966 8 => 'Dynamic Pixel Shift', #IB 967 65535 => 'n/a', #PH (Q MOV video) 681 968 }, 682 969 }, … … 705 992 29 => '4000x3000', #PH (X70) 706 993 30 => '4288x3216', #PH (Optio RS1000) 994 31 => '4608x3456', #PH (Optio RZ18) 707 995 129 => '1920x1080', #PH (Optio RZ10) 996 135 => '4608x2592', #PH (Q10 stretch filter) 708 997 257 => '3216x3216', #PH (Optio RZ10) 709 998 '0 0' => '2304x1728', #13 … … 717 1006 '36 0' => '3008x2008 or 3040x2024', #PH 718 1007 '37 0' => '3008x2000', #13 1008 # 65535 - seen for an X-5 panorama (PH) 719 1009 }, 720 1010 }, … … 727 1017 different from other models 728 1018 }, 729 ValueConv => '( $val < 4 and $$self{Model} =~ /Optio 555\b/) ? $val + 0.1 : $val',1019 ValueConv => '(IsInt($val) and $val < 4 and $$self{Model} =~ /Optio 555\b/) ? $val + 0.1 : $val', 730 1020 ValueConvInv => 'int $val', 731 1021 PrintConvColumns => 2, … … 764 1054 31 => 'Illustrations', #13 765 1055 33 => 'Digital Filter', #13 766 35 => 'Night Scene Portrait', # 251056 35 => 'Night Scene Portrait', #NJ 767 1057 37 => 'Museum', #PH 768 1058 38 => 'Food', #PH 769 39 => 'Underwater', # 251059 39 => 'Underwater', #NJ 770 1060 40 => 'Green Mode', #PH 771 1061 49 => 'Light Pet', #PH … … 777 1067 56 => 'Synchro Sound Record', #PH 778 1068 58 => 'Frame Composite', #14 779 59 => 'Report', # 251069 59 => 'Report', #NJ 780 1070 60 => 'Kids', #13 781 1071 61 => 'Blur Reduction', #13 1072 63 => 'Panorama 2', #PH (X-5) 782 1073 65 => 'Half-length Portrait', #JD 1074 66 => 'Portrait 2', #PH (LS645) 1075 74 => 'Digital Microscope', #PH (WG-4) 1076 75 => 'Blue Sky', #PH (LS465) 1077 80 => 'Miniature', #PH (VS20) 1078 81 => 'HDR', #PH (LS465) 1079 83 => 'Fisheye', #PH (VS20) 1080 85 => 'Digital Filter 4', #PH (WG-5) 783 1081 221 => 'P', #PH (Optio 555) 784 1082 255=> 'PICT', #PH (Optio 555) … … 822 1120 { 823 1121 Name => 'FocusMode', 824 Condition => '$self->{Make} =~ /^PENTAX/', 1122 # (can't test for "PENTAX" because MOV videos don't have Make) 1123 Condition => '$$self{Make} !~ /^Asahi/', 825 1124 Notes => 'Pentax models', 826 1125 Writable => 'int16u', … … 833 1132 4 => 'Super Macro', #JD 834 1133 5 => 'Pan Focus', 835 16 => 'AF-S', #17 836 17 => 'AF-C', #17 837 18 => 'AF-A', #PH (educated guess) 838 32 => 'Contrast-detect', #PH (K-5) 839 33 => 'Tracking Contrast-detect', #PH (K-5) 1134 # 8 - seen for Ricoh GR III 1135 # 9 - seen for Ricoh GR III 1136 16 => 'AF-S (Focus-priority)', #17 1137 17 => 'AF-C (Focus-priority)', #17 1138 18 => 'AF-A (Focus-priority)', #PH (educated guess) 1139 32 => 'Contrast-detect (Focus-priority)', #PH (K-5) 1140 33 => 'Tracking Contrast-detect (Focus-priority)', #PH (K-5) 1141 # bit 8 indicates release priority 1142 272 => 'AF-S (Release-priority)', #PH (K-5,K-3) 1143 273 => 'AF-C (Release-priority)', #PH (K-5,K-3) 1144 274 => 'AF-A (Release-priority)', #PH (K-3) 1145 288 => 'Contrast-detect (Release-priority)', #PH (K-01) 1146 # 32777 (0x8009) - seen for Ricoh GR III 1147 # 32779 (0x800b) - seen for Ricoh GR III 840 1148 }, 841 }, 842 { 1149 },{ 843 1150 Name => 'FocusMode', 844 1151 Writable => 'int16u', … … 852 1159 }, 853 1160 ], 854 0x000e => { #71161 0x000e => [{ #29 855 1162 Name => 'AFPointSelected', 1163 Condition => '$$self{Model} =~ /K-1\b/', 856 1164 Writable => 'int16u', 1165 Notes => 'K-1', 857 1166 PrintConvColumns => 2, 858 PrintConv => { 1167 PrintConv => [{ 1168 0xffff => 'Auto', 1169 0xfffe => 'Fixed Center', 1170 0xfffd => 'Automatic Tracking AF', #JD 1171 0xfffc => 'Face Detect AF', #JD 1172 0xfffb => 'AF Select', #PH (Q select from 25-areas) 1173 # AF pattern: 1174 # 01 02 03 04 05 1175 # 06 07 08 09 10 11 12 1176 # 13 14 15 16 17 18 19 20 21 1177 # 22 23 24 25 26 27 28 1178 # 29 30 31 32 33 1179 0 => 'None', 1180 1 => 'Top-left', 1181 2 => 'Top Near-left', 1182 3 => 'Top', 1183 4 => 'Top Near-right', 1184 5 => 'Top-right', 1185 6 => 'Upper Far-left', 1186 7 => 'Upper-left', 1187 8 => 'Upper Near-left', 1188 9 => 'Upper-middle', 1189 10 => 'Upper Near-right', 1190 11 => 'Upper-right', 1191 12 => 'Upper Far-right', 1192 13 => 'Far Far Left', 1193 14 => 'Far Left', 1194 15 => 'Left', 1195 16 => 'Near-left', 1196 17 => 'Center', 1197 18 => 'Near-right', 1198 19 => 'Right', 1199 20 => 'Far Right', 1200 21 => 'Far Far Right', 1201 22 => 'Lower Far-left', 1202 23 => 'Lower-left', 1203 24 => 'Lower Near-left', 1204 25 => 'Lower-middle', 1205 26 => 'Lower Near-right', 1206 27 => 'Lower-right', 1207 28 => 'Lower Far-right', 1208 29 => 'Bottom-left', 1209 30 => 'Bottom Near-left', 1210 31 => 'Bottom', 1211 32 => 'Bottom Near-right', 1212 33 => 'Bottom-right', 1213 263 => 'Zone Select Upper-left', # 01,02;06,07,08;14,15,16 1214 264 => 'Zone Select Upper Near-left', # 01,02,03;07,08,09;15,16,17 1215 265 => 'Zone Select Upper Middle', # 02,03,04;08,09,10;16,17,18 1216 266 => 'Zone Select Upper Near-right', # 03,04,05;09,10,11;17,18,19 1217 267 => 'Zone Select Upper-right', # 04,05;10,11,12;18,19,20 1218 270 => 'Zone Select Far Left', # 06,07;13,14,15;22,23 1219 271 => 'Zone Select Left', # 06,07,08;14,15,16;22,23,24 1220 272 => 'Zone Select Near-left', # 07,08,09;15,16,17;23,24,25 1221 273 => 'Zone Select Center', # 08,09,10;16,17,18;24,25,26 1222 274 => 'Zone Select Near-right', # 09,10,11;17,18,19;25,26,27 1223 275 => 'Zone Select Right', # 10,11,12;18,19,20;26,27,28 1224 276 => 'Zone Select Far Right', # 11,12;19,20,21;27,28 1225 279 => 'Zone Select Lower-left', # 14,15,16;22,23,24;29,30 1226 280 => 'Zone Select Lower Near-left', # 15,16,17;23,24,25;29,30,31 1227 281 => 'Zone Select Lower-middle', # 16,17,18;24,25,26;30,31,32 1228 282 => 'Zone Select Lower Near-right', # 17,18,19;25,26,27;31,32,33 1229 283 => 'Zone Select Lower-right', # 18,19,20;26,27,28;32,33 1230 },{ 1231 0 => 'Single Point', 1232 1 => 'Expanded Area 9-point (S)', 1233 3 => 'Expanded Area 25-point (M)', 1234 5 => 'Expanded Area 33-point (L)', 1235 }], 1236 },{ 1237 Name => 'AFPointSelected', 1238 Condition => '$$self{Model} =~ /K-3\b/', 1239 Writable => 'int16u', 1240 Notes => 'K-3', 1241 PrintConvColumns => 2, 1242 PrintConv => [{ 859 1243 # 0 - Contrast-detect AF? - PH (K-5) 860 1244 0xffff => 'Auto', … … 862 1246 0xfffd => 'Automatic Tracking AF', #JD 863 1247 0xfffc => 'Face Detect AF', #JD 1248 0xfffb => 'AF Select', #PH (Q select from 25-areas) 1249 # AF pattern: (ref forum5422) 1250 # 01 02 03 04 05 1251 # 06 07 08 09 10 1252 # 11 12 13 14 15 16 17 1253 # 18 19 20 21 22 1254 # 23 24 25 26 27 1255 0 => 'None', 1256 1 => 'Top-left', 1257 2 => 'Top Near-left', 1258 3 => 'Top', 1259 4 => 'Top Near-right', 1260 5 => 'Top-right', 1261 6 => 'Upper-left', 1262 7 => 'Upper Near-left', 1263 8 => 'Upper-middle', 1264 9 => 'Upper Near-right', 1265 10 => 'Upper-right', 1266 11 => 'Far Left', 1267 12 => 'Left', 1268 13 => 'Near-left', 1269 14 => 'Center', 1270 15 => 'Near-right', 1271 16 => 'Right', 1272 17 => 'Far Right', 1273 18 => 'Lower-left', 1274 19 => 'Lower Near-left', 1275 20 => 'Lower-middle', 1276 21 => 'Lower Near-right', 1277 22 => 'Lower-right', 1278 23 => 'Bottom-left', 1279 24 => 'Bottom Near-left', 1280 25 => 'Bottom', 1281 26 => 'Bottom Near-right', 1282 27 => 'Bottom-right', 1283 #forum5892 1284 257 => 'Zone Select Top-left', 1285 258 => 'Zone Select Top Near-left', 1286 259 => 'Zone Select Top', 1287 260 => 'Zone Select Top Near-right', 1288 261 => 'Zone Select Top-right', 1289 262 => 'Zone Select Upper-left', 1290 263 => 'Zone Select Upper Near-left', 1291 264 => 'Zone Select Upper-middle', 1292 265 => 'Zone Select Upper Near-right', 1293 266 => 'Zone Select Upper-right', 1294 267 => 'Zone Select Far Left', 1295 268 => 'Zone Select Left', 1296 269 => 'Zone Select Near-left', 1297 270 => 'Zone Select Center', 1298 271 => 'Zone Select Near-right', 1299 272 => 'Zone Select Right', 1300 273 => 'Zone Select Far Right', 1301 274 => 'Zone Select Lower-left', 1302 275 => 'Zone Select Lower Near-left', 1303 276 => 'Zone Select Lower-middle', 1304 277 => 'Zone Select Lower Near-right', 1305 278 => 'Zone Select Lower-right', 1306 279 => 'Zone Select Bottom-left', 1307 280 => 'Zone Select Bottom Near-left', 1308 281 => 'Zone Select Bottom', 1309 282 => 'Zone Select Bottom Near-right', 1310 283 => 'Zone Select Bottom-right', 1311 },{ #forum5892 1312 0 => 'Single Point', 1313 1 => 'Expanded Area 9-point (S)', 1314 3 => 'Expanded Area 25-point (M)', 1315 5 => 'Expanded Area 27-point (L)', 1316 }], 1317 },{ #7 1318 Name => 'AFPointSelected', 1319 Writable => 'int16u', 1320 Notes => 'other models', 1321 PrintConvColumns => 2, 1322 PrintConv => [{ 1323 # 0 - Contrast-detect AF? - PH (K-5) 1324 0xffff => 'Auto', 1325 0xfffe => 'Fixed Center', 1326 0xfffd => 'Automatic Tracking AF', #JD 1327 0xfffc => 'Face Detect AF', #JD 1328 0xfffb => 'AF Select', #PH (Q select from 25-areas) 1329 0 => 'None', #PH (Q in manual focus mode) 864 1330 1 => 'Upper-left', 865 1331 2 => 'Top', … … 874 1340 11 => 'Lower-right', 875 1341 }, 876 }, 877 0x000f => { #PH 1342 # (second number exists for K-5II(s) is usually 0, but is 1 for AF.C with 1343 # AFPointMode=='Select' and extended tracking focus points are enabled in the settings) 1344 ], 1345 }], 1346 0x000f => [{ #PH 878 1347 Name => 'AFPointsInFocus', 1348 Condition => '$$self{Model} =~ /K-3\b/', 1349 Writable => 'int32u', 1350 Notes => 'K-3 only', 1351 PrintHex => 1, 1352 PrintConv => { 1353 0 => '(none)', 1354 BITMASK => { 1355 0 => 'Top-left', 1356 1 => 'Top Near-left', 1357 2 => 'Top', 1358 3 => 'Top Near-right', 1359 4 => 'Top-right', 1360 5 => 'Upper-left', 1361 6 => 'Upper Near-left', 1362 7 => 'Upper-middle', 1363 8 => 'Upper Near-right', 1364 9 => 'Upper-right', 1365 10 => 'Far Left', 1366 11 => 'Left', 1367 12 => 'Near-left', 1368 13 => 'Center', 1369 14 => 'Near-right', 1370 15 => 'Right', 1371 16 => 'Far Right', 1372 17 => 'Lower-left', 1373 18 => 'Lower Near-left', 1374 19 => 'Lower-middle', 1375 20 => 'Lower Near-right', 1376 21 => 'Lower-right', 1377 22 => 'Bottom-left', 1378 23 => 'Bottom Near-left', 1379 24 => 'Bottom', 1380 25 => 'Bottom Near-right', 1381 26 => 'Bottom-right', 1382 }, 1383 }, 1384 },{ #PH 1385 Name => 'AFPointsInFocus', 1386 Notes => 'other models', 879 1387 Writable => 'int16u', 880 1388 PrintHex => 1, … … 892 1400 9 => 'Bottom-right', 893 1401 }, 894 } ,1402 }], 895 1403 0x0010 => { #PH 896 1404 Name => 'FocusPosition', … … 956 1464 32 => 40000, #PH 957 1465 33 => 51200, #PH 1466 34 => 64000, #PH (NC) 1467 35 => 80000, #PH (NC) 1468 36 => 102400, #27 1469 37 => 128000, #PH (NC) 1470 38 => 160000, #PH (NC) 1471 39 => 204800, #27 1472 40 => 256000, #PH (NC) 1473 41 => 320000, #PH (NC) 1474 42 => 409600, #PH (NC) 1475 43 => 512000, #PH (NC) 1476 44 => 640000, #PH (NC) 1477 45 => 819200, #PH (KP) 958 1478 # Optio 330/430 (oddball) 959 1479 50 => 50, #PH … … 986 1506 277 => 36000, #PH 987 1507 278 => 51200, #PH 1508 279 => 72000, #PH (NC) 1509 280 => 102400, #PH (NC) 1510 281 => 144000, #PH (NC) 1511 282 => 204800, #PH (NC) 1512 283 => 288000, #PH (NC) 1513 284 => 409600, #PH (NC) 1514 285 => 576000, #PH (NC) 1515 286 => 819200, #PH (NC) 1516 65534 => 'Auto 2', #PH (Q/Q10/Q7 MOV) [how is this different from 65535?] 1517 65535 => 'Auto', #PH/31 (K-01/K-70 MP4) 988 1518 }, 989 1519 }, … … 995 1525 Notes => q{ 996 1526 calibrated differently for different models. For the Optio WP, add 6 to get 997 approximate Light Value. May not be valid for some models, ie. Optio S998 }, 999 }, 1000 0x0016 => { #PH1527 approximate Light Value. May not be valid for some models, eg. Optio S 1528 }, 1529 }, 1530 0x0016 => [{ #PH 1001 1531 Name => 'ExposureCompensation', 1532 Condition => '$count == 1', 1533 Notes => q{ 1534 some models write two values here. The second value is meaning of the 1535 second value is not yet known 1536 }, 1002 1537 Writable => 'int16u', 1003 1538 ValueConv => '($val - 50) / 10', … … 1005 1540 PrintConv => '$val ? sprintf("%+.1f", $val) : 0', 1006 1541 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)', 1007 }, 1542 },{ 1543 Name => 'ExposureCompensation', 1544 Writable => 'int16u', 1545 # (2 values for K-70, etc -- have only seen "0" for the 2nd value - PH) 1546 Count => 2, 1547 ValueConv => '$val =~ s/ .*//; ($val - 50) / 10', 1548 ValueConvInv => 'int($val * 10 + 50.5) . " 0"', 1549 PrintConv => '$val ? sprintf("%+.1f", $val) : 0', 1550 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)', 1551 }], 1008 1552 0x0017 => { #3 1009 1553 Name => 'MeteringMode', … … 1026 1570 '+1', '+2' or '+3' for step size 1027 1571 }, 1028 # 1=.3ev, 2=.7, 3=1.0, ... 10=.5ev, 11=1.5, ... 1029 ValueConv => [ '$val<10 ? $val/3 : $val-9.5' ], 1030 ValueConvInv => [ 'abs($val-int($val)-.5)>0.05 ? int($val*3+0.5) : int($val+10)' ], 1572 # 1=.3ev, 2=.7, 3=1.0 ... 10=.5, 11=1.5, ... 4096=0, 4097=0.5 ... 8192=0, 8193=0.3 1573 # (models like K-1 and K-5 use 0x1000 and 0x2000 to indicate 1/2 and 1/3 EV step 1574 # size -- convert this as a fraction so we can recognize this format when writing) 1575 ValueConv => [ q{ 1576 return $val / 3 if $val < 10; 1577 return $val - 9.5 if $val < 20; 1578 return ($val - 0x1000) . '/2' if $val & 0x1000; 1579 return ($val - 0x2000) . '/3' if $val & 0x2000; 1580 return $val; # (shouldn't happen) 1581 }], 1582 ValueConvInv => [ q{ 1583 if ($val =~ s{/(\d+)$}{}) { 1584 return $val + 0x1000 if $1 == 2; 1585 return $val + 0x2000 if $1 == 3; 1586 return undef; 1587 } 1588 return abs($val-int($val)-.5)>0.05 ? int($val*3+0.5) : int($val+10); 1589 }], 1031 1590 PrintConv => sub { 1032 1591 my @v = split(' ', shift); 1033 $v[0] = sprintf('%.1f', $v[0]) if $v[0] ;1592 $v[0] = sprintf('%.1f', $v[0]) if $v[0] and $v[0]!~m{/}; 1034 1593 if ($v[1]) { 1035 1594 my %s = (1=>'WB-BA',2=>'WB-GM',3=>'Saturation',4=>'Sharpness', … … 1077 1636 9 => 'Flash', #13 1078 1637 10 => 'Cloudy', #13 1638 11 => 'Warm White Fluorescent', #PH (K-3) 1639 14 => 'Multi Auto', #PH (K-3) 1079 1640 15 => 'Color Temperature Enhancement', #PH 1080 1641 17 => 'Kelvin', #PH … … 1152 1713 PrintConvColumns => 2, 1153 1714 PrintConv => [{ # the *istD has pairs of values - PH 1154 0 => ' Low', #PH1155 1 => ' Normal', #PH1156 2 => ' High', #PH1157 3 => ' Med Low', #21158 4 => ' Med High', #21159 5 => ' Very Low', #(NC)1160 6 => ' Very High', #(NC)1161 7 => '-4 ', #PH (K-5)1162 8 => '+4 ', #PH (NC)1715 0 => '-2 (low)', #PH 1716 1 => '0 (normal)', #PH 1717 2 => '+2 (high)', #PH 1718 3 => '-1 (medium low)', #2 1719 4 => '+1 (medium high)', #2 1720 5 => '-3 (very low)', #PH 1721 6 => '+3 (very high)', #PH (NC) 1722 7 => '-4 (minimum)', #PH (NC) 1723 8 => '+4 (maximum)', #PH (K-5) 1163 1724 65535 => 'None', #PH (Monochrome) 1164 1725 }], … … 1171 1732 PrintConvColumns => 2, 1172 1733 PrintConv => [{ # the *istD has pairs of values - PH 1173 0 => 'Low', #PH 1174 1 => 'Normal', #PH 1175 2 => 'High', #PH 1176 3 => 'Med Low', #2 1177 4 => 'Med High', #2 1178 5 => 'Very Low', #PH 1179 6 => 'Very High', #PH (NC) 1180 7 => '-4', #PH (NC) 1181 8 => '+4', #PH (K-5) 1734 0 => '-2 (low)', #PH 1735 1 => '0 (normal)', #PH 1736 2 => '+2 (high)', #PH 1737 3 => '-1 (medium low)', #2 1738 4 => '+1 (medium high)', #2 1739 5 => '-3 (very low)', #PH 1740 6 => '+3 (very high)', #PH (NC) 1741 7 => '-4 (minimum)', #PH (NC) 1742 8 => '+4 (maximum)', #PH (K-5) 1743 65535 => 'n/a', # got this for a Backlight Silhouette - PH (Q) 1182 1744 }], 1183 1745 }, … … 1189 1751 PrintConvColumns => 2, 1190 1752 PrintConv => [{ # the *istD has pairs of values - PH 1191 0 => ' Soft', #PH1192 1 => ' Normal', #PH1193 2 => ' Hard', #PH1194 3 => ' Med Soft', #21195 4 => ' Med Hard', #21196 5 => ' Very Soft', #(NC)1197 6 => ' Very Hard', #(NC)1198 7 => '-4 ', #PH (NC)1199 8 => '+4 ', #PH (NC)1753 0 => '-2 (soft)', #PH 1754 1 => '0 (normal)', #PH 1755 2 => '+2 (hard)', #PH 1756 3 => '-1 (medium soft)', #2 1757 4 => '+1 (medium hard)', #2 1758 5 => '-3 (very soft)', #(NC) 1759 6 => '+3 (very hard)', #(NC) 1760 7 => '-4 (minimum)', #PH (NC) 1761 8 => '+4 (maximum)', #PH (NC) 1200 1762 }], 1201 1763 }, … … 1256 1818 }, 1257 1819 # 0x002b - definitely exposure related somehow - PH 1258 0x002d => { #PH1820 0x002d => [{ #PH 1259 1821 Name => 'EffectiveLV', 1822 Condition => '$format eq "int16u"', 1260 1823 Notes => 'camera-calculated light value, but includes exposure compensation', 1261 1824 Writable => 'int16u', 1825 Format => 'int16s', # (negative values are valid even though Pentax writes int16u) 1262 1826 ValueConv => '$val/1024', 1263 1827 ValueConvInv => '$val * 1024', 1264 1828 PrintConv => 'sprintf("%.1f",$val)', 1265 1829 PrintConvInv => '$val', 1266 }, 1830 },{ 1831 Name => 'EffectiveLV', 1832 Condition => '$format eq "int32u"', 1833 Writable => 'int32u', 1834 Format => 'int32s', 1835 ValueConv => '$val/1024', 1836 ValueConvInv => '$val * 1024', 1837 PrintConv => 'sprintf("%.1f",$val)', 1838 PrintConvInv => '$val', 1839 }], 1267 1840 0x0032 => { #13 1268 1841 Name => 'ImageEditing', … … 1277 1850 '2 0 0 0' => 'Cropped', #PH 1278 1851 # note: doesn't apply to digital filters applied when picture is taken 1279 '4 0 0 0' => 'Digital Filter 4', #PH (K10D )1852 '4 0 0 0' => 'Digital Filter 4', #PH (K10D, Ricoh WG-5) 1280 1853 '6 0 0 0' => 'Digital Filter 6', #PH (K-5) 1854 '8 0 0 0' => 'Red-eye Correction', #PH (WG-10) 1281 1855 '16 0 0 0' => 'Frame Synthesis?', 1282 1856 }, … … 1310 1884 '0 17' => 'Candlelight', 1311 1885 '0 18' => 'Museum', 1312 '0 19' => 'Food', #(n/c)1886 '0 19' => 'Food', 1313 1887 '0 20' => 'Stage Lighting', 1314 1888 '0 21' => 'Night Snap', 1889 '0 23' => 'Blue Sky', # (Q) 1890 '0 24' => 'Sunset', # (Q) 1891 '0 26' => 'Night Scene HDR', # (Q) 1892 '0 27' => 'HDR', # (Q) 1893 '0 28' => 'Quick Macro', # (Q) 1894 '0 29' => 'Forest', # (Q) 1895 '0 30' => 'Backlight Silhouette', # (Q) 1315 1896 # AUTO PICT modes (auto-selected) 1316 1897 '1 4' => 'Auto PICT (Standard)', #13 … … 1335 1916 '11 0' => 'Manual, Off-Auto-Aperture', 1336 1917 '12 0' => 'Bulb, Off-Auto-Aperture', 1918 '19 0' => 'Astrotracer', #29 1337 1919 # extra K10D modes (ref 16) 1338 1920 '13 0' => 'Shutter & Aperture Priority AE', … … 1344 1926 '18 3' => 'Auto Program (MTF)', #PH (NC) 1345 1927 '18 22' => 'Auto Program (Shallow DOF)', #PH (NC) 1346 '254 0' => 'Video', #PH (K-7,K-5) 1347 '255 0' => 'Video (Auto Aperture)', #PH (K-5) 1348 '255 4' => 'Video (4)', #PH (K-x) 1928 '20 22' => 'Blur Control', #PH (Q) 1929 '249 0' => 'Movie (TAv)', #31 1930 '250 0' => 'Movie (TAv, Auto Aperture)', #31 1931 '251 0' => 'Movie (Manual)', #31 1932 '252 0' => 'Movie (Manual, Auto Aperture)', #31 1933 '253 0' => 'Movie (Av)', #31 1934 '254 0' => 'Movie (Av, Auto Aperture)', #31 1935 '255 0' => 'Movie (P, Auto Aperture)', #31 1936 '255 4' => 'Video (4)', #PH (K-x,K-01) 1349 1937 },{ 1350 1938 # EV step size (ref 19) … … 1358 1946 Count => 4, 1359 1947 PrintConv => [{ 1360 0 => 'Single-frame', 1948 0 => 'Single-frame', # (also Interval Shooting for K-01 - PH) 1361 1949 1 => 'Continuous', # (K-5 Hi) 1362 1950 2 => 'Continuous (Lo)', #PH (K-5) 1363 1951 3 => 'Burst', #PH (K20D) 1952 4 => 'Continuous (Medium)', #PH (K-3) 1364 1953 255 => 'Video', #PH (K-x) 1365 # (K20D also has an Interval mode that needs decoding)1366 1954 },{ 1367 1955 0 => 'No Timer', 1368 1956 1 => 'Self-timer (12 s)', 1369 1957 2 => 'Self-timer (2 s)', 1958 15 => 'Video', #PH (Q MOV) 1370 1959 16 => 'Mirror Lock-up', # (K-5) 1371 1960 255 => 'n/a', #PH (K-x) … … 1378 1967 0x00 => 'Single Exposure', 1379 1968 0x01 => 'Multiple Exposure', 1969 0x02 => 'Composite Average', #31 1970 0x03 => 'Composite Additive', #31 1971 0x04 => 'Composite Bright', #31 1972 0x08 => 'Interval Shooting', #31 1973 0x0a => 'Interval Composite Average', #31 1974 0x0b => 'Interval Composite Additive', #31 1975 0x0c => 'Interval Composite Bright', #31 1976 0x0f => 'Interval Movie', #PH (K-01) 1380 1977 0x10 => 'HDR', #PH (645D) 1381 1978 0x20 => 'HDR Strong 1', #PH (NC) (K-5) 1382 1979 0x30 => 'HDR Strong 2', #PH (K-5) 1383 1980 0x40 => 'HDR Strong 3', #PH (K-5) 1384 0xe0 => 'HDR Auto', #PH (K-5) 1981 0x50 => 'HDR Manual', #31 (K-70 HDR 1 and HDR 2) 1982 0xe0 => 'HDR Auto', #PH (K-5, K-70) 1385 1983 0xff => 'Video', #PH (K-x) 1386 1984 }], … … 1394 1992 # 11894 7962 (K10D,K-m) 12012 7987 (*istDS,K100D,K110D) 12012 8019 (*istD), 1395 1993 # 12061 7988 (K-5) 12053 8005 (K-r,K-x) 14352 9535 (K20D,K-7) 1396 # 22315 16711 (645) 1994 # 22315 16711 (645) 12080 8008 (K-01) 1397 1995 ValueConv => 'my @a=split(" ",$val); $_/=500 foreach @a; join(" ",@a)', 1398 1996 ValueConvInv => 'my @a=split(" ",$val); $_*=500 foreach @a; join(" ",@a)', … … 1431 2029 ValueConv => '$val & 0x7ff', # ignore other bits for now 1432 2030 PrintConvColumns => 2, 1433 PrintConv => { BITMASK => { 1434 0 => 'Upper-left', 1435 1 => 'Top', 1436 2 => 'Upper-right', 1437 3 => 'Left', 1438 4 => 'Mid-left', 1439 5 => 'Center', 1440 6 => 'Mid-right', 1441 7 => 'Right', 1442 8 => 'Lower-left', 1443 9 => 'Bottom', 1444 10 => 'Lower-right', 1445 } }, 1446 }, 1447 # 0x003d - int16u: 8192 for most images, but occasionally 11571 for K100D/K110D, 1448 # and 8289 or 8456 for the K-x - PH 2031 PrintConv => { 2032 0 => '(none)', 2033 BITMASK => { 2034 0 => 'Upper-left', 2035 1 => 'Top', 2036 2 => 'Upper-right', 2037 3 => 'Left', 2038 4 => 'Mid-left', 2039 5 => 'Center', 2040 6 => 'Mid-right', 2041 7 => 'Right', 2042 8 => 'Lower-left', 2043 9 => 'Bottom', 2044 10 => 'Lower-right', 2045 }, 2046 }, 2047 }, 2048 0x003d => { #IB 2049 Name => 'DataScaling', 2050 Writable => 'int16u', 2051 # divide by the second value of Pentax_0x0201 (WhitePoint), usually 2052 # 8192, to get the floating point normalization factor. 2053 # One of the examples of how this tag can be used is calculation of 2054 # baseline exposure compensation (Adobe-style) for a PEF: 2055 # log2(Pentax_0x007e)-14-0.5+log2(Pentax_0x003d)-13 2056 # or 2057 # log2(Pentax_0x007e*(Pentax_0x003d/(2^13))/(2^14))-0.5 2058 # where 2059 # makernotes:Pentax_0x003d/(2^13) is the normalization factor. (ref IB) 2060 # - 8192 for most images, but occasionally 11571 for K100D/K110D, 2061 # and 8289 or 8456 for the K-x (ref PH) 2062 }, 1449 2063 0x003e => { #PH 1450 2064 Name => 'PreviewImageBorders', … … 1454 2068 }, 1455 2069 0x003f => { #PH 1456 Name => 'LensType', 1457 Writable => 'int8u', 1458 Count => 2, 1459 SeparateTable => 1, 1460 # the K-m adds two zeros to the LensType, some other models add only 1 1461 ValueConv => '$val=~s/^(\d+ \d+)( 0){1,2}$/$1/; $val', 1462 ValueConvInv => '$val', 1463 PrintConv => \%pentaxLensTypes, 2070 Name => 'LensRec', 2071 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::LensRec' }, 1464 2072 }, 1465 2073 0x0040 => { #PH … … 1476 2084 }, 1477 2085 0x0047 => { #PH 1478 Name => 'CameraTemperature', 2086 Name => 'CameraTemperature', # (chassis temperature, ref forum6677) 1479 2087 Writable => 'int8s', 1480 2088 PrintConv => '"$val C"', … … 1494 2102 PrintConv => { 0 => 'Off', 1 => 'On' }, 1495 2103 }, 1496 0x004d => { #PH2104 0x004d => [{ #PH 1497 2105 Name => 'FlashExposureComp', 2106 Condition => '$count == 1', 1498 2107 Writable => 'int32s', 1499 2108 ValueConv => '$val / 256', … … 1501 2110 PrintConv => '$val ? sprintf("%+.1f", $val) : 0', 1502 2111 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)', 1503 }, 2112 },{ #PH (K-3) 2113 Name => 'FlashExposureComp', 2114 Writable => 'int8s', 2115 Count => 2, # (don't know what the 2nd number is for) 2116 ValueConv => [ '$val / 6' ], 2117 ValueConvInv => [ '$val / 6' ], 2118 PrintConv => [ '$val ? sprintf("%+.1f", $val) : 0' ], 2119 PrintConvInv => [ 'Image::ExifTool::Exif::ConvertFraction($val)' ], 2120 }], 1504 2121 0x004f => { #PH 1505 2122 Name => 'ImageTone', # (Called CustomImageMode in K20D manual) … … 1514 2131 5 => 'Monochrome', # (K20D) 1515 2132 6 => 'Muted', # (645D) 1516 7 => 'Reversal Film', # (645D) 2133 7 => 'Reversal Film', # (645D) (Ricoh WG-5 "Slide Film") 1517 2134 8 => 'Bleach Bypass', # (K-5) 2135 9 => 'Radiant', # (Q) 2136 10 => 'Cross Processing', #31 (K-70) 2137 11 => 'Flat', #31 (K-70) 2138 # 256 - seen for GR III 2139 # 262 - seen for GR III 1518 2140 }, 1519 2141 }, … … 1526 2148 }, 1527 2149 # 0x0053-0x005a - not in JPEG images - PH 1528 0x005c => { #PH 2150 0x0053 => { #28 2151 Name => 'ColorTempDaylight', 2152 %colorTemp, 2153 Notes => '0x0053-0x005a are 3 numbers: Kelvin, shift AB, shift GM', 2154 }, 2155 0x0054 => { Name => 'ColorTempShade', %colorTemp }, #28 2156 0x0055 => { Name => 'ColorTempCloudy', %colorTemp }, #28 2157 0x0056 => { Name => 'ColorTempTungsten', %colorTemp }, #28 2158 0x0057 => { Name => 'ColorTempFluorescentD', %colorTemp }, #28 2159 0x0058 => { Name => 'ColorTempFluorescentN', %colorTemp }, #28 2160 0x0059 => { Name => 'ColorTempFluorescentW', %colorTemp }, #28 2161 0x005a => { Name => 'ColorTempFlash', %colorTemp }, #28 2162 0x005c => [{ #PH 2163 Name => 'ShakeReductionInfo', 2164 Condition => '$count == 4', # (2 bytes for the K-3) 2165 Format => 'undef', # (written as int8u) - do this just to save time converting the value 2166 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::SRInfo' }, 2167 },{ 1529 2168 Name => 'ShakeReductionInfo', 1530 2169 Format => 'undef', # (written as int8u) - do this just to save time converting the value 1531 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::SRInfo ' },1532 } ,2170 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::SRInfo2' }, 2171 }], 1533 2172 0x005d => { #JD/PH 1534 2173 # (used by all Pentax DSLR's except *istD and *istDS until firmware 2.0 - PH) … … 1537 2176 # of test images shot in the factory. (But my new K-5 started at 1 - PH) 1538 2177 # This count includes shutter actuations even if they don't result in a 1539 # recorded image ( ie. manual white balance frame or digital preview), but2178 # recorded image (eg. manual white balance frame or digital preview), but 1540 2179 # does not include actuations due to Live View or video recording - PH 1541 2180 Name => 'ShutterCount', … … 1555 2194 ValueConvInv => '$val', 1556 2195 }, 2196 # 0x005e - 1557 2197 0x0060 => { #PH (K-5) 1558 2198 Name => 'FaceInfo', … … 1560 2200 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::FaceInfo' }, 1561 2201 }, 1562 # 0x0062 - int16u: 1 (K10D,K200D,K-m,K2000), 3 (K20D), 4 (K-7), 5 (K-x), 6 (645D), 7 (K-r), 8 (K-5) 2202 0x0062 => { #forum4803 2203 Name => 'RawDevelopmentProcess', 2204 Condition => '$$self{Make} =~ /^(PENTAX|RICOH)/', # rules out Kodak, which also use this tag 2205 Writable => 'int16u', 2206 PrintConv => { 2207 1 => '1 (K10D,K200D,K2000,K-m)', 2208 3 => '3 (K20D)', 2209 4 => '4 (K-7)', 2210 5 => '5 (K-x)', 2211 6 => '6 (645D)', 2212 7 => '7 (K-r)', 2213 8 => '8 (K-5,K-5II,K-5IIs)', 2214 9 => '9 (Q)', 2215 10 => '10 (K-01,K-30,K-50,K-500)', 2216 11 => '11 (Q10)', 2217 12 => '12 (MX-1,Q-S1,Q7)', 2218 13 => '13 (K-3,K-3II)', 2219 14 => '14 (645Z)', 2220 15 => '15 (K-S1,K-S2)', #PH 2221 16 => '16 (K-1)', #PH 2222 17 => '17 (K-70)', #29 2223 18 => '18 (KP)', #PH 2224 19 => '19 (GR III)', #PH 2225 }, 2226 }, 1563 2227 0x0067 => { #PH (K-5) 1564 2228 Name => 'Hue', … … 1584 2248 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::AWBInfo' }, 1585 2249 }, 1586 0x0069 => { #PH (K20D ; K-5highlights only)2250 0x0069 => { #PH (K20D, K-5, K-01 highlights only) 1587 2251 Name => 'DynamicRangeExpansion', 2252 Notes => q{ 2253 called highlight correction by Pentax for the K20D, K-5, K-01 and maybe 2254 other models 2255 }, 1588 2256 Writable => 'undef', 1589 2257 Format => 'int8u', 1590 2258 Count => 4, 1591 PrintConv => { 1592 '0 0 0 0' => 'Off', 1593 '1 0 0 0' => 'On', 1594 }, 2259 PrintConv => [{ 2260 0 => 'Off', 2261 1 => 'On', 2262 },{ 2263 0 => 0, 2264 1 => 'Enabled', # (K-01) 2265 2 => 'Auto', # (K-01) 2266 }], 1595 2267 }, 1596 2268 0x006b => { #PH (K-5) … … 1739 2411 DataMember => 'FacesDetected', 1740 2412 RawConv => '$val =~ / (\d+)/ and $$self{FacesDetected} = $1; $val', 2413 # (the K-3 reports "On" even in phase-detect focus modes) 1741 2414 PrintConv => [ 1742 2415 '$val ? "On ($val faces max)" : "Off"', … … 1757 2430 # 0x0078 - int16u[2]: '0 0' (K-5,K-7,K-r,K-x) 1758 2431 0x0079 => { #PH 1759 Name => 'ShadowCo mpensation',2432 Name => 'ShadowCorrection', 1760 2433 Writable => 'int8u', 1761 2434 Count => -1, … … 1765 2438 0 => 'Off', 1766 2439 1 => 'On', 2440 2 => 'Auto 2', # (NC, WG-3) 1767 2441 '0 0' => 'Off', 1768 2442 '1 1' => 'Weak', 1769 2443 '1 2' => 'Normal', 1770 2444 '1 3' => 'Strong', 2445 '2 4' => 'Auto', # (K-01) 1771 2446 }, 1772 2447 }, … … 1779 2454 '2 0' => 'Standard', 1780 2455 '3 0' => 'Fast', 2456 # '1 108' - seen for GR III 1781 2457 }, 1782 2458 }, … … 1801 2477 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::LensCorr' }, 1802 2478 }, 1803 # 0x007e - int32u: 15859,15860,15864,15865,16315 (K-5 PEF/DNG only) - PH 2479 0x007e => { #IB 2480 Name => 'WhiteLevel', # (with black level already subtracted) 2481 Writable => 'int32u', 2482 # 15859,15860,15864,15865,16315 (K-5 PEF/DNG only) - PH 2483 # 3934, 3935 (Q DNG) - PH 2484 }, 1804 2485 0x007f => { #PH (K-5) 1805 2486 Name => 'BleachBypassToning', … … 1807 2488 PrintConvColumns => 2, 1808 2489 PrintConv => { 1809 65535 => 'Off', 2490 65535 => 'n/a', #31 2491 0 => 'Off', #31 1810 2492 1 => 'Green', 1811 2493 2 => 'Yellow', … … 1818 2500 }, 1819 2501 }, 2502 0x0080 => { #PH (Q) 2503 Name => 'AspectRatio', 2504 PrintConv => { 2505 0 => '4:3', 2506 1 => '3:2', 2507 2 => '16:9', 2508 3 => '1:1', 2509 }, 2510 }, 2511 # 0x0081 - int8u: 0 (Q) 2512 0x0082 => { 2513 Name => 'BlurControl', 2514 Writable => 'int8u', 2515 Count => 4, 2516 PrintConv => [ 2517 { 2518 0 => 'Off', 2519 1 => 'Low', 2520 2 => 'Medium', 2521 3 => 'High', 2522 }, 2523 undef, # 0 with BlurControl is Off, seen 0,1,3 when on (related to subject distance?) 2524 undef, # 0 with BlurControl Off, 45 when on 2525 undef, # always 0 2526 ], 2527 }, 2528 # 0x0083 - int8u: 0 (Q DNG) 2529 # 0x0084 - int8u: 0 (Q) 2530 0x0085 => { #PH 2531 Name => 'HDR', 2532 Format => 'int8u', 2533 Count => 4, 2534 PrintConv => [{ # (K-01,K-3) 2535 0 => 'Off', 2536 1 => 'HDR Auto', 2537 2 => 'HDR 1', 2538 3 => 'HDR 2', 2539 4 => 'HDR 3', 2540 5 => 'HDR Advanced', #29 (K-1) 2541 },{ # (K-01) 2542 0 => 'Auto-align Off', 2543 1 => 'Auto-align On', 2544 },{ 2545 # not sure about this - PH 2546 # - you can set HDR "Exposure Bracket Value" with the K-3 2547 # - guessed from imaging-resource K-3 samples K3OUTBHDR_A{1,2,3} 2548 0 => 'n/a', 2549 4 => '1 EV', 2550 8 => '2 EV', 2551 12 => '3 EV', # (get this from K-01, but can't set EV) 2552 }, 2553 # (4th number is always 0) 2554 ], 2555 }, 2556 # 0x0086 - int8u: 0, 111[Sport,Pet] (Q) - related to Tracking FocusMode? 2557 # 0x0087 - int8u: 0 (Q) 2558 0x0087 => { #PH 2559 Name => 'ShutterType', 2560 Writable => 'int8u', 2561 PrintConv => { 2562 0 => 'Normal', # ('Mechanical' if the camera has a mechanical shutter) 2563 1 => 'Electronic', # (KP) 2564 }, 2565 }, 2566 0x0088 => { #PH 2567 Name => 'NeutralDensityFilter', 2568 Writable => 'int8u', 2569 Count => -1, 2570 PrintConv => { 2571 0 => 'Off', 2572 1 => 'On', 2573 '0 2' => 'Off (0 2)', #PH (NC, GR III) 2574 '1 2' => 'On (1 2)', #PH (NC, GR III) 2575 }, 2576 }, 2577 0x008b => { #PH (LS465) 2578 Name => 'ISO', 2579 Priority => 0, 2580 Writable => 'int32u', 2581 }, 2582 0x0092 => { #31 2583 Name => 'IntervalShooting', 2584 Notes => '2 numbers: 1. Shot number 2. Total number of shots', 2585 Writable => 'int16u', 2586 Count => 2, 2587 PrintConv => { 2588 '0 0' => 'Off', 2589 OTHER => sub { 2590 my ($val, $inv) = @_; 2591 if ($inv) { 2592 $val =~ tr/0-9 //dc; 2593 } else { 2594 $val =~ s/(\d+) (\d+)/Shot $1 of $2/; 2595 } 2596 return $val; 2597 }, 2598 }, 2599 }, 2600 0x0095 => { #31 2601 Name => 'SkinToneCorrection', 2602 Writable => 'int8s', 2603 Count => 2, 2604 PrintConv => { 2605 '0 0' => 'Off', 2606 '1 1' => 'On (type 1)', 2607 '1 2' => 'On (type 2)', 2608 }, 2609 }, 2610 0x0096 => { #31 2611 Name => 'ClarityControl', 2612 Writable => 'int8s', 2613 Count => 2, 2614 PrintConv => { 2615 '0 0' => 'Off', 2616 OTHER => sub { 2617 my ($val, $inv) = @_; 2618 if ($inv) { 2619 $val =~ /(\d+ -?\d+)/ and return $1; 2620 return ("1 $val"); 2621 } elsif ($val =~ /^1 (-?\d+)$/) { 2622 return $1 ? sprintf('%+d', $1) : 0; 2623 } else { 2624 return "Unknown ($val)"; 2625 } 2626 }, 2627 }, 2628 }, 1820 2629 0x0200 => { #5 1821 2630 Name => 'BlackPoint', … … 1834 2643 # 0x0202: int16u[4]: all 0's in all my samples 1835 2644 0x0203 => { #JD (not really sure what these mean) 1836 Name => 'ColorMatrixA', 2645 Name => 'ColorMatrixA', # (camera RGB to sRGB matrix, *ist D, ref IB) 1837 2646 Writable => 'int16s', 1838 2647 Count => 9, … … 1843 2652 }, 1844 2653 0x0204 => { #JD 1845 Name => 'ColorMatrixB', 2654 Name => 'ColorMatrixB', # (camera RGB to Adobe RGB matrix, *ist D, ref IB) 1846 2655 Writable => 'int16s', 1847 2656 Count => 9, … … 1851 2660 PrintConvInv => '"$val"', 1852 2661 }, 1853 0x0205 => { #192662 0x0205 => [{ #19 1854 2663 Name => 'CameraSettings', 2664 # size: *istD/*istDs/K100D/K110D=16, K-m/K2000=14, K-7/K-x=19, 2665 # K200D/K20D/K-5/645D=20, K-r=21, K10D=22, K-01=25 2666 Condition => '$count < 25', # (not valid for the K-01) 1855 2667 SubDirectory => { 1856 2668 TagTable => 'Image::ExifTool::Pentax::CameraSettings', 1857 2669 ByteOrder => 'BigEndian', 1858 2670 }, 1859 }, 1860 0x0206 => { #PH 2671 },{ 2672 Name => 'CameraSettingsUnknown', 2673 SubDirectory => { 2674 TagTable => 'Image::ExifTool::Pentax::CameraSettingsUnknown', 2675 ByteOrder => 'BigEndian', 2676 }, 2677 }], 2678 0x0206 => [{ #PH 1861 2679 Name => 'AEInfo', 2680 # size: *istD/*istDs/K100D/K110D=14, K10D/K200D/K20D=16, K-m/K2000=20, 2681 # K-7/K-x=24, K-5/K-r/645D=25 2682 Condition => '$count <= 25 and $count != 21 and $$self{AEInfoSize} = $count', 1862 2683 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::AEInfo' }, 1863 }, 2684 },{ 2685 Name => 'AEInfo2', 2686 # size: K-01=21 2687 Condition => '$count == 21', 2688 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::AEInfo2' }, 2689 },{ 2690 Name => 'AEInfo3', 2691 # size: K-30=48 2692 Condition => '$count == 48', 2693 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::AEInfo3' }, 2694 },{ 2695 Name => 'AEInfoUnknown', 2696 # size: Q/Q10=34 2697 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::AEInfoUnknown' }, 2698 }], 1864 2699 0x0207 => [ #PH 1865 2700 { … … 1876 2711 },{ 1877 2712 Name => 'LensInfo', 1878 Condition => '$count < 90',2713 Condition => '$count != 90 and $count != 91 and $count != 80 and $count != 128 and $count != 168', 1879 2714 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::LensInfo2' }, 1880 2715 },{ 1881 Name => 'LensInfo', 2716 Name => 'LensInfo', # 645D 1882 2717 Condition => '$count == 90', 1883 2718 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::LensInfo3' }, 1884 2719 },{ 1885 Name => 'LensInfo', 2720 Name => 'LensInfo', # K-r, K-5, K-5II 2721 Condition => '$count == 91', 1886 2722 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::LensInfo4' }, 2723 },{ 2724 Name => 'LensInfo', # K-01, K-30, K-50, K-500, K-3, K-3II 2725 Condition => '$count == 80 or $count == 128', 2726 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::LensInfo5' }, 1887 2727 } 2728 # ($count == 168 - Ricoh GR III) 1888 2729 ], 1889 2730 0x0208 => [ #PH … … 1904 2745 Notes => q{ 1905 2746 measurements from each of the 16 AE metering segments for models such as the 1906 K10D, and 77 metering segments for models such as the K-5, converted to LV 2747 K10D, 77 metering segments for models such as the K-5, and 4050 metering 2748 segments for the K-3, converted to LV 1907 2749 }, 1908 2750 %convertMeteringSegments, 1909 # 16 metering segment77 metering segment1910 # locations (ref JD)locations (ref PH, K-5)2751 # 16 metering segment 77 metering segment 2752 # locations (ref JD, K10D) locations (ref PH, K-5) 1911 2753 # +-------------------------+ 1912 2754 # | 14 | +----------------------------------+ … … 1986 2828 }, 1987 2829 }, 1988 # 0x021a - undef[1068] (K-5) 2830 # 0x021a - undef[1068] (K-5) - ToneMode/Saturation mapping matrices (ref 28) 1989 2831 0x021b => { #19 1990 2832 Name => 'SaturationInfo', … … 2003 2845 # 0x021c - undef[18] (K-5) 2004 2846 # 0x021d - undef[18] (K-5) 2005 # 0x021e - undef[8] (K-5 )2847 # 0x021e - undef[8] (K-5, Q) 2006 2848 0x021f => { #JD 2007 2849 Name => 'AFInfo', … … 2019 2861 Flags => [ 'Unknown', 'Binary' ], 2020 2862 Writable => 0, 2021 Notes => 'found in K10D, K20D and K2000D PEF images', 2022 }, 2023 # 0x0221 - undef[138] (K-5) 2863 Notes => 'found in K10D, K20D and K2000 PEF images', 2864 }, 2865 0x0221 => { #28 2866 Name => 'KelvinWB', 2867 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::KelvinWB' }, 2868 }, 2024 2869 0x0222 => { #PH 2025 2870 Name => 'ColorInfo', … … 2029 2874 0x0224 => { #19 2030 2875 Name => 'EVStepInfo', 2876 Drop => 200, # drop if larger than 200 bytes (40 kB in Pentax Q and Q10) 2031 2877 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::EVStepInfo' }, 2032 2878 }, … … 2050 2896 Notes => 'left blank by some cameras', 2051 2897 }, 2052 0x022a => { #PH (K-5) 2898 0x022a => [{ #PH (RICOH models (GR III)) 2899 Name => 'FilterInfo', 2900 Condition => '$$self{Make} =~ /^RICOH/', 2901 SubDirectory => { 2902 TagTable => 'Image::ExifTool::Pentax::FilterInfo', 2903 ByteOrder => 'LittleEndian', 2904 }, 2905 },{ #PH (K-5) 2053 2906 Name => 'FilterInfo', 2054 2907 SubDirectory => { … … 2056 2909 ByteOrder => 'BigEndian', 2057 2910 }, 2058 } ,2911 }], 2059 2912 0x022b => { #PH (K-5) 2060 2913 Name => 'LevelInfo', … … 2062 2915 }, 2063 2916 # 0x022c - undef[46] (K-5) 2064 # 0x022d - undef[100] (K-5) 2917 0x022d => { #28 2918 Name => 'WBLevels', 2919 Condition => '$count == 100', # (just to be safe, but no other counts observed) 2920 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::WBLevels' }, 2921 }, 2065 2922 0x022e => { #PH (K-5 AVI videos) 2066 2923 Name => 'Artist', … … 2073 2930 Writable => 'string', 2074 2931 }, 2075 0x0230 => { #PH (K-x AVI videos) 2932 0x0230 => { #PH (K-x AVI videos) (and K-70/Q-S1 MOV videos, ref 31) 2076 2933 Name => 'FirmwareVersion', 2077 Notes => 'only in AVIvideos',2078 # this tag only exists in AVI videos, and for the K-x the value of2934 Notes => 'only in videos', 2935 # this tag only exists in AVI/MOV videos, and for the K-x the value of 2079 2936 # this tag is "K-x Ver 1.00", which is the same as the EXIF Software 2080 2937 # tag. I used a different tag name for this because Pentax uses the … … 2098 2955 Count => 10, 2099 2956 }, 2957 # 0x0236 - undef[52] (Q) 2958 # 0x0237 - undef[11] possibly related to smart effect setting? (Q) 2959 # 0x0238 - undef[9] (Q) 2960 0x0239 => { #PH 2961 Name => 'LensInfoQ', 2962 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::LensInfoQ' }, 2963 }, 2964 # 0x023a - undef[10] (Q) 2965 # 0x023b - undef[9] (K-01) 2966 # 01a700500000000000, 91a700500000000000, 41a700500000000000, 002700500000000000 2967 # c00500400000000000, 400500500000000000, 4004ff420100000000, 4087ff480000000000 2968 0x023f => { #31 (K-70 MOV videos) 2969 Name => 'Model', 2970 Description => 'Camera Model Name', 2971 Writable => 'string', 2972 }, 2973 0x0243 => { #PH 2974 Name => 'PixelShiftInfo', 2975 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::PixelShiftInfo' }, 2976 }, 2977 0x0245 => { #29 2978 Name => 'AFPointInfo', 2979 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::AFPointInfo' }, 2980 }, 2100 2981 0x03fe => { #PH 2101 2982 Name => 'DataDump', … … 2105 2986 0x03ff => [ #PH 2106 2987 { 2107 Name => 'TempInfo K5',2108 Condition => '$$self{Model} =~ /K- 5\b/',2109 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::TempInfo K5' },2988 Name => 'TempInfo', 2989 Condition => '$$self{Model} =~ /K-(01|3|30|5|50|500)\b/', 2990 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::TempInfo' }, 2110 2991 },{ 2111 2992 Name => 'UnknownInfo', … … 2122 3003 }, 2123 3004 # 0x0404 - undef[2086] (K-5) 2124 # 0x0405 - undef[24200] (K-5 PEF/DNG only) 3005 0x0405 => { #PH - undef[24200] (K-5 PEF/DNG only), undef[28672] (Q DNG) 3006 Name => 'UnknownBlock', 3007 Writable => 'undef', 3008 Notes => 'large unknown data block in PEF/DNG images but not JPG images', 3009 Flags => [ 'Unknown', 'Binary', 'Drop' ], 3010 }, 2125 3011 # 0x0406 - undef[4116] (K-5) 3012 # 0x0407 - undef[3072] (Q DNG) 3013 # 0x0408 - undef[1024] (Q DNG) 2126 3014 0x0e00 => { 2127 3015 Name => 'PrintIM', … … 2157 3045 1 => 'On', 2158 3046 4 => 'Off (4)', # (K20D, K200D, K-7, K-5) 2159 5 => 'On (5)', #(guess) (K20D) 2160 # (got 5 for K-5 with HDR [auto-align off only], Composition Adjust, and movie with SR off!) 3047 5 => 'On but Disabled', # (K20D, K-5) 3048 # (can be 5 "On but Disabled" for K-5 with HDR [auto-align off only], 3049 # Composition Adjust, DriveMode = Self-timer or Remote, and movie with SR off!) 2161 3050 6 => 'On (Video)', # (K-7) 2162 3051 7 => 'On (7)', #(NC) (K20D, K200D, K-m, K-5) 2163 15 => 'On (15)', # (K20D (with Tamron 10-20mm @ 10mm)) 3052 15 => 'On (15)', # (K20D with Tamron 10-20mm @ 10mm) 3053 39 => 'On (mode 2)', # (K-01) (on during capture and live view) 3054 135 => 'On (135)', # (K-5IIs) 3055 167 => 'On (mode 1)', # (K-01) (on during capture only) 2164 3056 }, 2165 3057 }, … … 2169 3061 # (from http://www.patentstorm.us/patents/6597867-description.html) 2170 3062 # (here, SR could more accurately mean Shutter Release, not Shake Reduction) 3063 # (not valid for K-01 - PH) 2171 3064 Notes => q{ 2172 3065 time from when the shutter button was half pressed to when the shutter was 2173 released, including time for focusing 3066 released, including time for focusing. Not valid for some models 2174 3067 }, 2175 3068 # (constant of 60 determined from times: 2sec=127; 3sec=184,197; 4sec=244,249,243,246 - PH) … … 2185 3078 PrintConv => '"$val mm"', 2186 3079 PrintConvInv => '$val=~s/\s*mm//;$val', 3080 }, 3081 ); 3082 3083 # shake reduction information for the K-3 (ref PH) 3084 %Image::ExifTool::Pentax::SRInfo2 = ( 3085 %binaryDataAttrs, 3086 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 3087 NOTES => 'Shake reduction information for the K-3.', 3088 0 => { 3089 Name => 'SRResult', 3090 Unknown => 1, 3091 PrintConv => { BITMASK => { 3092 # Bit 0 - have seen this set in a few Pentax samples - PH 3093 # Bit 6 - usually set when SR is Off, and occasionally when On - PH 3094 # Bit 7 - set when AA simulation is on - PH 3095 }}, 3096 }, 3097 1 => { 3098 Name => 'ShakeReduction', 3099 PrintConv => { #forum5425 3100 0 => 'Off', # (NC for K-3) 3101 1 => 'On', # (NC for K-3) 3102 4 => 'Off (AA simulation off)', 3103 5 => 'On but Disabled', # (NC for K-3) 3104 6 => 'On (Video)', # (NC for K-3) 3105 7 => 'On (AA simulation off)', 3106 8 => 'Off (AA simulation type 1) (8)', #forum8362 (K-70) 3107 12 => 'Off (AA simulation type 1)', # (AA linear motion) 3108 15 => 'On (AA simulation type 1)', # (AA linear motion) 3109 16 => 'Off (AA simulation type 2) (16)', #forum8362 (K-70) 3110 20 => 'Off (AA simulation type 2)', # (AA circular motion) 3111 23 => 'On (AA simulation type 2)', # (AA circular motion) 3112 }, 2187 3113 }, 2188 3114 ); … … 2237 3163 Mask => 0x01, 2238 3164 PrintConv => { 2239 0 x00=> 'Hometown',2240 0x01 => 'Destination',3165 0 => 'Hometown', 3166 1 => 'Destination', 2241 3167 }, 2242 3168 }, … … 2244 3170 Name => 'HometownDST', 2245 3171 Mask => 0x02, 2246 PrintConv => { 2247 0x00 => 'No', 2248 0x02 => 'Yes', 2249 }, 3172 PrintConv => \%noYes, 2250 3173 }, 2251 3174 0.3 => { 2252 3175 Name => 'DestinationDST', 2253 3176 Mask => 0x04, 2254 PrintConv => { 2255 0x00 => 'No', 2256 0x04 => 'Yes', 2257 }, 3177 PrintConv => \%noYes, 2258 3178 }, 2259 3179 2 => { … … 2281 3201 PrintConv => { 0 => 'Off', 1 => 'On' }, 2282 3202 }, 3203 2 => { 3204 Name => 'PeripheralIlluminationCorr', 3205 PrintConv => { 0 => 'Off', 1 => 'On' }, 3206 }, 3207 3 => { 3208 Name => 'DiffractionCorrection', 3209 PrintConv => { 0 => 'Off', 16 => 'On' }, 3210 }, 2283 3211 ); 2284 3212 … … 2288 3216 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 2289 3217 PRIORITY => 0, 2290 NOTES => ' Shotinformation written by Pentax DSLR cameras.',3218 NOTES => 'Camera settings information written by Pentax DSLR cameras.', 2291 3219 0 => { 2292 3220 Name => 'PictureMode2', … … 2325 3253 Mask => 0x20, 2326 3254 PrintConv => { 2327 0 x00=> '1/2 EV Steps',2328 0x20=> '1/3 EV Steps',3255 0 => '1/2 EV Steps', 3256 1 => '1/3 EV Steps', 2329 3257 }, 2330 3258 }, … … 2334 3262 Mask => 0x40, 2335 3263 PrintConv => { 2336 0 x00=> 'Tv or Av',2337 0x40=> 'P Shift',3264 0 => 'Tv or Av', 3265 1 => 'P Shift', 2338 3266 }, 2339 3267 }, … … 2343 3271 Mask => 0x80, 2344 3272 PrintConv => { 2345 0 x00=> 'Prohibited',2346 0x80=> 'Permitted',3273 0 => 'Prohibited', 3274 1 => 'Permitted', 2347 3275 }, 2348 3276 }, … … 2351 3279 Notes => 'the camera flash options settings, set even if the flash is off', 2352 3280 Mask => 0xf0, 2353 ValueConv => '$val>>4',2354 ValueConvInv => '$val<<4',2355 3281 # Note: These tags correlate with the FlashMode and InternalFlashMode values, 2356 3282 # and match what is displayed by the Pentax software … … 2370 3296 Name => 'MeteringMode2', 2371 3297 Mask => 0x0f, 2372 Notes => 'may not be valid for some models, ie. *ist D',3298 Notes => 'may not be valid for some models, eg. *ist D', 2373 3299 PrintConv => { 2374 3300 0 => 'Multi-segment', … … 2383 3309 Mask => 0xf0, 2384 3310 PrintConv => { 2385 0 x00=> 'Auto',3311 0 => 'Auto', 2386 3312 BITMASK => { 2387 4=> 'Select',2388 5=> 'Fixed Center',2389 # have seen bit 6set in pre-production images (firmware 0.20) - PH3313 0 => 'Select', 3314 1 => 'Fixed Center', 3315 # have seen bit 2 set in pre-production images (firmware 0.20) - PH 2390 3316 }, 2391 3317 }, … … 2446 3372 Name => 'ExposureBracketStepSize', 2447 3373 # This is set even when Exposure Bracket is Off (and the K10D 2448 # displays Ò---Óas the step size when you press the EB button) - DaveN3374 # displays "---" as the step size when you press the EB button) - DaveN 2449 3375 # because the last value is remembered and if you turn Exposure Bracket 2450 3376 # on the step size goes back to what it was before. … … 2485 3411 PrintConv => { 2486 3412 0 => 'Auto', 2487 1 6=> 'Daylight',2488 32 => 'Shade',2489 48=> 'Cloudy',2490 64 => 'Daylight Fluorescent',2491 80=> 'Day White Fluorescent',2492 96 => 'White Fluorescent',2493 112=> 'Tungsten',2494 128 => 'Flash',2495 144=> 'Manual',3413 1 => 'Daylight', 3414 2 => 'Shade', 3415 3 => 'Cloudy', 3416 4 => 'Daylight Fluorescent', 3417 5 => 'Day White Fluorescent', 3418 6 => 'White Fluorescent', 3419 7 => 'Tungsten', 3420 8 => 'Flash', 3421 9 => 'Manual', 2496 3422 # The three Set Color Temperature settings refer to the 3 preset settings which 2497 3423 # can be saved in the menu (see page 123 of the K10D manual) 2498 1 92 => 'Set Color Temperature 1',2499 208=> 'Set Color Temperature 2',2500 224 => 'Set Color Temperature 3',3424 12 => 'Set Color Temperature 1', 3425 13 => 'Set Color Temperature 2', 3426 14 => 'Set Color Temperature 3', 2501 3427 }, 2502 3428 }, … … 2551 3477 Notes => 'K-5 only', 2552 3478 Mask => 0x01, 2553 PrintConv => { 2554 0x00 => 'Off', 2555 0x01 => 'On', 2556 }, 3479 PrintConv => { 0 => 'Off', 1 => 'On' }, 2557 3480 }, 2558 3481 14.3 => { #PH (K-5) … … 2562 3485 Mask => 0x02, 2563 3486 PrintConv => { 2564 0 x00=> '1 EV Steps',2565 0x02=> 'As EV Steps',3487 0 => '1 EV Steps', 3488 1 => 'As EV Steps', 2566 3489 }, 2567 3490 }, … … 2571 3494 Notes => 'K-5 only', 2572 3495 Mask => 0x04, 2573 PrintConv => { 2574 0x00 => 'Off', 2575 0x04 => 'On', 2576 }, 3496 PrintConv => { 0 => 'Off', 1 => 'On' }, 2577 3497 }, 2578 3498 # 14.5 Mask 0x80 - changes for K-5 … … 2589 3509 # (these tags relate closely to InternalFlashMode values - PH) 2590 3510 PrintConv => { 2591 0 x00=> 'Normal', # (this value never occurs in Green Mode) - ref 192592 0x10=> 'Red-eye reduction', # (this value never occurs in Green Mode) - ref 192593 0x20=> 'Auto', # (this value only occurs in Green Mode) - ref 192594 0x30=> 'Auto, Red-eye reduction', # (this value only occurs in Green Mode) - ref 192595 0x50=> 'Wireless (Master)',2596 0x60=> 'Wireless (Control)',2597 0x80=> 'Slow-sync',2598 0x90=> 'Slow-sync, Red-eye reduction',2599 0xa0 => 'Trailing-curtain Sync'3511 0 => 'Normal', # (this value never occurs in Green Mode) - ref 19 3512 1 => 'Red-eye reduction', # (this value never occurs in Green Mode) - ref 19 3513 2 => 'Auto', # (this value only occurs in Green Mode) - ref 19 3514 3 => 'Auto, Red-eye reduction', # (this value only occurs in Green Mode) - ref 19 3515 5 => 'Wireless (Master)', 3516 6 => 'Wireless (Control)', 3517 8 => 'Slow-sync', 3518 9 => 'Slow-sync, Red-eye reduction', 3519 10 => 'Trailing-curtain Sync' 2600 3520 }, 2601 3521 }, … … 2622 3542 }, 2623 3543 Mask => 0x80, 2624 PrintConv => { 2625 0x00 => 'No', 2626 0x80 => 'Yes', 2627 }, 3544 PrintConv => \%noYes, 2628 3545 }, 2629 3546 17.2 => { … … 2633 3550 Mask => 0x60, 2634 3551 PrintConv => { 2635 0 x00=> 'Horizontal (normal)',2636 0x20=> 'Rotate 180',2637 0x40=> 'Rotate 90 CW',2638 0x60=> 'Rotate 270 CW',3552 0 => 'Horizontal (normal)', 3553 1 => 'Rotate 180', 3554 2 => 'Rotate 90 CW', 3555 3 => 'Rotate 270 CW', 2639 3556 }, 2640 3557 }, … … 2647 3564 Mask => 0x04, 2648 3565 PrintConv => { 2649 0 x00=> 'Manual',2650 0x04=> 'Auto',3566 0 => 'Manual', 3567 1 => 'Auto', 2651 3568 }, 2652 3569 }, … … 2657 3574 Mask => 0x02, 2658 3575 PrintConv => { 2659 0 x00=> '1 EV Steps',2660 0x02=> 'As EV Steps',3576 0 => '1 EV Steps', 3577 1 => 'As EV Steps', 2661 3578 }, 2662 3579 }, … … 2704 3621 ); 2705 3622 3623 # unknown camera settings (K-01) 3624 %Image::ExifTool::Pentax::CameraSettingsUnknown = ( 3625 %binaryDataAttrs, 3626 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 3627 NOTES => 'This information has not yet been decoded for models such as the K-01.', 3628 ); 3629 2706 3630 # auto-exposure information (ref PH) 2707 3631 %Image::ExifTool::Pentax::AEInfo = ( 2708 3632 %binaryDataAttrs, 2709 3633 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 2710 DATAMEMBER => [ 8 ], 2711 # instead of /8, should these be PentaxEV(), as in CameraSettings? - PH 3634 DATAMEMBER => [ 7 ], 3635 NOTES => 'Auto-exposure information for most Pentax models.', 3636 # instead of /8, should these be PentaxEv(), as in CameraSettings? - PH 2712 3637 0 => { 2713 3638 Name => 'AEExposureTime', … … 2777 3702 83 => 'No Flash', 2778 3703 91 => 'Night Scene', 3704 # 96 - seen for Pentax Q10 2779 3705 99 => 'Surf & Snow', 3706 104 => 'Night Snap', # (Q) 2780 3707 107 => 'Text', 2781 3708 115 => 'Sunset', 3709 # 116 - seen for Pentax Q (vivid?) 2782 3710 123 => 'Kids', 2783 3711 131 => 'Pet', 2784 3712 139 => 'Candlelight', 3713 144 => 'SCN', # (Q) 3714 160 => 'Program', # (Q) 3715 # 142 - seen for Pentax Q in Program mode 2785 3716 147 => 'Museum', 2786 3717 184 => 'Shallow DOF Program', # (K-5) 3718 216 => 'HDR', # (Q) 2787 3719 }, 2788 3720 }, 2789 3721 7 => { 2790 3722 Name => 'AEFlags', 2791 Unknown => 1,2792 3723 Writable => 0, 3724 Hook => '$size > 20 and $varSize += 1', 3725 Notes => 'indices after this are incremented by 1 for some models', 3726 # (this tag can't be unknown because the Hook must be evaluated 3727 # to shift the following offsets if necessary. Instead, ignore 3728 # the return value unless Unknown option used) 3729 RawConv => '$$self{OPTIONS}{Unknown} ? $val : undef', 2793 3730 PrintConv => { #19 2794 3731 # (seems to be the warnings displayed in the viewfinder for several bits) … … 2808 3745 }, 2809 3746 }, 2810 8 => {2811 Name => 'AEUnknown',2812 Notes => 'indices after this are incremented by 1 for some models',2813 Format => 'var_int8u[$size > 20 ? 2 : 1]',2814 Writable => 0,2815 # (this tag can't be unknown because the Format must be evaluated2816 # to shift the following offsets if necessary. Instead, ignore2817 # the return value unless Unknown > 1)2818 RawConv => '$$self{OPTIONS}{Unknown} > 1 ? $val : undef',2819 },2820 3747 # Note: Offsets below shifted by 1 if record size is > 20 bytes 2821 # (implemented by the var_int8u count above) 3748 # (implemented by the Hook above) 3749 8 => { #30 3750 Name => 'AEApertureSteps', 3751 Notes => q{ 3752 number of steps the aperture has been stopped down from wide open. There 3753 are roughly 8 steps per F-stop for most lenses, or 18 steps for 645D lenses, 3754 but it varies slightly by lens 3755 }, 3756 PrintConv => '$val == 255 ? "n/a" : $val', 3757 PrintConvInv => '$val eq "n/a" ? 255 : $val', 3758 }, 2822 3759 9 => { #19 2823 3760 Name => 'AEMaxAperture', … … 2854 3791 }, 2855 3792 }, 2856 # 13 - related to program mode somehow - PH 3793 13 => { #30 3794 Name => 'AEWhiteBalance', 3795 Condition => '$$self{AEInfoSize} == 24', # (not thoroughly tested for other sizes) 3796 Notes => 'K7 and Kx', 3797 Mask => 0xf0, 3798 PrintConv => { 3799 0 => 'Standard', 3800 1 => 'Daylight', 3801 2 => 'Shade', 3802 3 => 'Cloudy', 3803 4 => 'Daylight Fluorescent', 3804 5 => 'Day White Fluorescent', 3805 6 => 'White Fluorescent', 3806 7 => 'Tungsten', 3807 8 => 'Unknown', #31 (or not set due to inadequate lighting) 3808 }, 3809 }, 3810 13.1 => { #30 3811 Name => 'AEMeteringMode2', 3812 Condition => '$$self{AEInfoSize} == 24', # (not thoroughly tested for other sizes) 3813 Notes => 'K7 and Kx, override for an incompatible metering mode setting', 3814 Mask => 0x0f, 3815 PrintConv => { 3816 0 => 'Multi-segment', 3817 BITMASK => { 3818 0 => 'Center-weighted average', 3819 1 => 'Spot', 3820 # 2 - seen for K7 AVI movie 3821 }, 3822 }, 3823 }, 2857 3824 14 => { #19 2858 3825 Name => 'FlashExposureCompSet', 3826 Description => 'Flash Exposure Comp. Setting', 2859 3827 Format => 'int8s', 2860 3828 Notes => q{ … … 2868 3836 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)', 2869 3837 }, 3838 21 => { #30 3839 Name => 'LevelIndicator', 3840 PrintConv => '$val == 90 ? "n/a" : $val', 3841 PrintConvInv => '$val eq "n/a" ? 90 : $val', 3842 }, 3843 ); 3844 3845 # auto-exposure information for the K-01 (ref PH) 3846 %Image::ExifTool::Pentax::AEInfo2 = ( 3847 %binaryDataAttrs, 3848 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 3849 NOTES => 'Auto-exposure information for the K-01.', 3850 # instead of /8, should these be PentaxEv(), as in CameraSettings? - PH 3851 2 => { 3852 Name => 'AEExposureTime', 3853 Notes => 'val = 24 * 2**((32-raw)/8)', 3854 ValueConv => '24*exp(-($val-32)*log(2)/8)', 3855 ValueConvInv => '-log($val/24)*8/log(2)+32', 3856 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)', 3857 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)', 3858 }, 3859 3 => { 3860 Name => 'AEAperture', 3861 Notes => 'val = 2**((raw-68)/16)', 3862 ValueConv => 'exp(($val-68)*log(2)/16)', 3863 ValueConvInv => 'log($val)*16/log(2)+68', 3864 PrintConv => 'sprintf("%.1f",$val)', 3865 PrintConvInv => '$val', 3866 }, 3867 4 => { 3868 Name => 'AE_ISO', 3869 Notes => 'val = 100 * 2**((raw-32)/8)', 3870 ValueConv => '100*exp(($val-32)*log(2)/8)', 3871 ValueConvInv => 'log($val/100)*8/log(2)+32', 3872 PrintConv => 'int($val + 0.5)', 3873 PrintConvInv => '$val', 3874 }, 3875 5 => { 3876 Name => 'AEXv', 3877 # this is the negative of exposure compensation, not including bracketing 3878 Notes => 'val = (raw-64)/8', 3879 ValueConv => '($val-64)/8', 3880 ValueConvInv => '$val * 8 + 64', 3881 }, 3882 6 => { 3883 Name => 'AEBXv', 3884 # this is the negative of auto exposure bracketing compensation 3885 Format => 'int8s', 3886 Notes => 'val = raw / 8', 3887 ValueConv => '$val / 8', 3888 ValueConvInv => '$val * 8', 3889 }, 3890 8 => { 3891 Name => 'AEError', 3892 Format => 'int8s', 3893 # this is usually zero except in M exposure mode, but it can be non-zero 3894 # in other modes (eg. if you hit an aperture limit in Tv mode) 3895 ValueConv => '-($val-64)/8', # (negate to make overexposed positive) 3896 ValueConvInv => '-$val * 8 + 64', 3897 }, 3898 11 => { 3899 Name => 'AEApertureSteps', 3900 Notes => q{ 3901 number of steps the aperture has been stopped down from wide open. There 3902 are roughly 8 steps per F-stop, but it varies slightly by lens 3903 }, 3904 PrintConv => '$val == 255 ? "n/a" : $val', 3905 PrintConvInv => '$val eq "n/a" ? 255 : $val', 3906 }, 3907 15 => { 3908 Name => 'SceneMode', 3909 PrintConvColumns => 2, 3910 PrintConv => { 3911 0 => 'Off', 3912 1 => 'HDR', 3913 4 => 'Auto PICT', 3914 5 => 'Portrait', 3915 6 => 'Landscape', 3916 7 => 'Macro', 3917 8 => 'Sport', 3918 9 => 'Night Scene Portrait', 3919 10 => 'No Flash', 3920 11 => 'Night Scene', 3921 12 => 'Surf & Snow', 3922 14 => 'Sunset', 3923 15 => 'Kids', 3924 16 => 'Pet', 3925 17 => 'Candlelight', 3926 18 => 'Museum', 3927 20 => 'Food', 3928 21 => 'Stage Lighting', 3929 22 => 'Night Snap', 3930 25 => 'Night Scene HDR', 3931 26 => 'Blue Sky', 3932 27 => 'Forest', 3933 29 => 'Backlight Silhouette', 3934 }, 3935 }, 3936 16 => { 3937 Name => 'AEMaxAperture', 3938 Notes => 'val = 2**((raw-68)/16)', 3939 ValueConv => 'exp(($val-68)*log(2)/16)', 3940 ValueConvInv => 'log($val)*16/log(2)+68', 3941 PrintConv => 'sprintf("%.1f",$val)', 3942 PrintConvInv => '$val', 3943 }, 3944 17 => { 3945 Name => 'AEMaxAperture2', 3946 Notes => 'val = 2**((raw-68)/16)', 3947 ValueConv => 'exp(($val-68)*log(2)/16)', 3948 ValueConvInv => 'log($val)*16/log(2)+68', 3949 PrintConv => 'sprintf("%.1f",$val)', 3950 PrintConvInv => '$val', 3951 }, 3952 18 => { 3953 Name => 'AEMinAperture', 3954 Notes => 'val = 2**((raw-68)/16)', 3955 ValueConv => 'exp(($val-68)*log(2)/16)', 3956 ValueConvInv => 'log($val)*16/log(2)+68', 3957 PrintConv => 'sprintf("%.0f",$val)', 3958 PrintConvInv => '$val', 3959 }, 3960 19 => { 3961 Name => 'AEMinExposureTime', 3962 Notes => 'val = 24 * 2**((32-raw)/8)', 3963 ValueConv => '24*exp(-($val-32)*log(2)/8)', 3964 ValueConvInv => '-log($val/24)*8/log(2)+32', 3965 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)', 3966 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)', 3967 }, 3968 ); 3969 3970 # auto-exposure information for the K-30 (ref PH) 3971 %Image::ExifTool::Pentax::AEInfo3 = ( 3972 %binaryDataAttrs, 3973 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 3974 NOTES => 'Auto-exposure information for the K-3, K-30, K-50 and K-500.', 3975 # instead of /8, should these be PentaxEv(), as in CameraSettings? - PH 3976 16 => { 3977 Name => 'AEExposureTime', 3978 Notes => 'val = 24 * 2**((32-raw)/8)', 3979 ValueConv => '24*exp(-($val-32)*log(2)/8)', 3980 ValueConvInv => '-log($val/24)*8/log(2)+32', 3981 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)', 3982 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)', 3983 }, 3984 17 => { 3985 Name => 'AEAperture', 3986 Notes => 'val = 2**((raw-68)/16)', 3987 ValueConv => 'exp(($val-68)*log(2)/16)', 3988 ValueConvInv => 'log($val)*16/log(2)+68', 3989 PrintConv => 'sprintf("%.1f",$val)', 3990 PrintConvInv => '$val', 3991 }, 3992 18 => { 3993 Name => 'AE_ISO', 3994 Notes => 'val = 100 * 2**((raw-32)/8)', 3995 ValueConv => '100*exp(($val-32)*log(2)/8)', 3996 ValueConvInv => 'log($val/100)*8/log(2)+32', 3997 PrintConv => 'int($val + 0.5)', 3998 PrintConvInv => '$val', 3999 }, 4000 28 => { 4001 Name => 'AEMaxAperture', 4002 Notes => 'val = 2**((raw-68)/16)', 4003 ValueConv => 'exp(($val-68)*log(2)/16)', 4004 ValueConvInv => 'log($val)*16/log(2)+68', 4005 PrintConv => 'sprintf("%.1f",$val)', 4006 PrintConvInv => '$val', 4007 }, 4008 29 => { 4009 Name => 'AEMaxAperture2', 4010 Notes => 'val = 2**((raw-68)/16)', 4011 ValueConv => 'exp(($val-68)*log(2)/16)', 4012 ValueConvInv => 'log($val)*16/log(2)+68', 4013 PrintConv => 'sprintf("%.1f",$val)', 4014 PrintConvInv => '$val', 4015 }, 4016 30 => { 4017 Name => 'AEMinAperture', 4018 Notes => 'val = 2**((raw-68)/16)', 4019 ValueConv => 'exp(($val-68)*log(2)/16)', 4020 ValueConvInv => 'log($val)*16/log(2)+68', 4021 PrintConv => 'sprintf("%.0f",$val)', 4022 PrintConvInv => '$val', 4023 }, 4024 31 => { 4025 Name => 'AEMinExposureTime', 4026 Notes => 'val = 24 * 2**((32-raw)/8)', 4027 ValueConv => '24*exp(-($val-32)*log(2)/8)', 4028 ValueConvInv => '-log($val/24)*8/log(2)+32', 4029 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)', 4030 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)', 4031 }, 4032 ); 4033 4034 # unknown auto-exposure information (Q, Q10) 4035 %Image::ExifTool::Pentax::AEInfoUnknown = ( 4036 %binaryDataAttrs, 4037 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 4038 ); 4039 4040 # lens type 4041 %Image::ExifTool::Pentax::LensRec = ( 4042 %binaryDataAttrs, 4043 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 4044 NOTES => q{ 4045 This record stores the LensType, plus one or two unknown bytes for some 4046 models. 4047 }, 4048 0 => { 4049 Name => 'LensType', 4050 Format => 'int8u[2]', 4051 Priority => 0, 4052 ValueConvInv => '$val=~s/\.\d+$//; $val', 4053 PrintConv => \%pentaxLensTypes, 4054 SeparateTable => 1, 4055 }, 4056 3 => { #PH 4057 Name => 'ExtenderStatus', 4058 Notes => 'not valid if a non-AF lens is used', 4059 PrintConv => { 0 => 'Not attached', 1 => 'Attached' }, 4060 }, 4061 # this is a binaryData table because some cameras add an extra 4062 # byte or two here (typically zeros)... 2870 4063 ); 2871 4064 … … 2880 4073 Format => 'int8u[2]', 2881 4074 Priority => 0, 4075 ValueConvInv => '$val=~s/\.\d+$//; $val', 2882 4076 PrintConv => \%pentaxLensTypes, 2883 4077 SeparateTable => 1, … … 2906 4100 return "$v[0] $v[1]"; 2907 4101 }, 4102 # just fill in the missing bits/bytes with zeros... 4103 ValueConvInv => q{ 4104 my @v = split(' ',$val); 4105 return undef unless @v == 2; 4106 $v[2] = ($v[1] >> 8) & 0xff; 4107 $v[3] = $v[1] & 0xff; 4108 $v[1] = 0; 4109 return "@v"; 4110 }, 2908 4111 PrintConv => \%pentaxLensTypes, 2909 4112 SeparateTable => 1, … … 2932 4135 return "$v[0] $v[1]"; 2933 4136 }, 4137 # just fill in the missing bits/bytes with zeros... 4138 ValueConvInv => q{ 4139 my @v = split(' ',$val); 4140 return undef unless @v == 2; 4141 $v[2] = ($v[1] >> 8) & 0xff; 4142 $v[3] = $v[1] & 0xff; 4143 $v[1] = 0; 4144 return "@v"; 4145 }, 2934 4146 PrintConv => \%pentaxLensTypes, 2935 4147 SeparateTable => 1, … … 2958 4170 return "$v[0] $v[1]"; 2959 4171 }, 4172 # just fill in the missing bits/bytes with zeros... 4173 ValueConvInv => q{ 4174 my @v = split(' ',$val); 4175 return undef unless @v == 2; 4176 $v[2] = ($v[1] >> 8) & 0xff; 4177 $v[3] = $v[1] & 0xff; 4178 $v[1] = 0; 4179 return "@v"; 4180 }, 2960 4181 PrintConv => \%pentaxLensTypes, 2961 4182 SeparateTable => 1, 2962 4183 }, 2963 4184 12 => { 4185 Name => 'LensData', 4186 Format => 'undef[18]', 4187 Condition => '$$self{NewLensData} = 1', # not really a condition, just used to set flag 4188 SubDirectory => { TagTable => 'Image::ExifTool::Pentax::LensData' }, 4189 }, 4190 ); 4191 4192 # lens information for K-01, K-30, K-50, K-500, K-3, K-3II, K-S1 (ref PH) 4193 %Image::ExifTool::Pentax::LensInfo5 = ( 4194 %binaryDataAttrs, 4195 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 4196 IS_SUBDIR => [ 15 ], 4197 NOTES => 'Pentax lens information structure for the K-01 and newer models.', 4198 1 => { 4199 Name => 'LensType', 4200 Format => 'int8u[5]', 4201 Priority => 0, 4202 ValueConv => q{ 4203 my @v = split(' ',$val); 4204 $v[0] &= 0x0f; 4205 $v[1] = $v[3] * 256 + $v[4]; # (always high byte first) 4206 return "$v[0] $v[1]"; 4207 }, 4208 # just fill in the missing bits/bytes with zeros... 4209 ValueConvInv => q{ 4210 my @v = split(' ',$val); 4211 return undef unless @v == 2; 4212 $v[3] = ($v[1] >> 8) & 0xff; 4213 $v[4] = $v[1] & 0xff; 4214 $v[1] = $v[2] = 0; 4215 return "@v"; 4216 }, 4217 PrintConv => \%pentaxLensTypes, 4218 SeparateTable => 1, 4219 }, 4220 15 => { 2964 4221 Name => 'LensData', 2965 4222 Format => 'undef[17]', … … 2972 4229 %binaryDataAttrs, 2973 4230 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 4231 DATAMEMBER => [ 12.1 ], 2974 4232 NOTES => q{ 2975 4233 Pentax lens data information. Some of these tags require interesting binary … … 2980 4238 0.1 => { #JD 2981 4239 Name => 'AutoAperture', 4240 Condition => 'not $$self{NewLensData}', 4241 Notes => 'not valid for the K-r, K-5 or K-5II', #29 2982 4242 Mask => 0x01, 2983 PrintConv => { 2984 0 => 'On', 2985 1 => 'Off', 2986 }, 4243 PrintConv => { 0 => 'On', 1 => 'Off' }, 2987 4244 }, 2988 4245 0.2 => { #JD 2989 4246 Name => 'MinAperture', 4247 Condition => 'not $$self{NewLensData}', 4248 Notes => 'not valid for the K-r, K-5 or K-5II', #29 2990 4249 Mask => 0x06, 2991 4250 PrintConv => { 2992 0 x00=> 22,2993 0x02=> 32,2994 0x04=> 45,2995 0x06=> 16,4251 0 => 22, 4252 1 => 32, 4253 2 => 45, 4254 3 => 16, 2996 4255 }, 2997 4256 }, 2998 4257 0.3 => { #JD 2999 4258 Name => 'LensFStops', 4259 Condition => 'not $$self{NewLensData}', 4260 Notes => 'not valid for the K-r, K-5 or K-5II', #29 3000 4261 Mask => 0x70, 3001 ValueConv => '5 + ( ($val >> 4)^ 0x07) / 2',3002 ValueConvInv => '(( ($val - 5) * 2) ^ 0x07) << 4',4262 ValueConv => '5 + ($val ^ 0x07) / 2', 4263 ValueConvInv => '(($val - 5) * 2) ^ 0x07', 3003 4264 }, 3004 4265 # 1-16 look like Lens Codes LC0-LC15, ref patent 5617173 and 5999753 [+notes by PH] … … 3011 4272 %lensCode, 3012 4273 }, 3013 3 => { # LC2 = distance data 3014 Name => 'LC2', 3015 %lensCode, 3016 # FocusRange decoding needs more testing with various lenses - PH 3017 TestName => 'FocusRange', 3018 TestPrintConv => q{ 3019 my @v; 3020 my $lsb = $val & 0x07; 3021 my $msb = $val >> 3; 3022 my $ls2 = $lsb ^ 0x07; 3023 $ls2 ^= 0x01 if $ls2 & 0x02; 3024 $ls2 ^= 0x03 if $ls2 & 0x04; 3025 foreach ($ls2, $ls2+1) { 3026 push(@v,'inf'), next if $_ > 7; 3027 push @v, sprintf("%.2f m", 2 ** ($msb / 4) * 0.18 * ($_ + 4) / 16); 3028 } 3029 return join ' - ', @v; 4274 # LC2 = distance data 4275 3 => { #29 4276 Name => 'MinFocusDistance', 4277 Notes => 'minimum focus distance for the lens', 4278 Mask => 0xf8, 4279 PrintConv => { 4280 0 => '0.13-0.19 m', # (plus K or M lenses) 4281 1 => '0.20-0.24 m', 4282 2 => '0.25-0.28 m', 4283 3 => '0.28-0.30 m', 4284 4 => '0.35-0.38 m', 4285 5 => '0.40-0.45 m', 4286 6 => '0.49-0.50 m', # (plus many Sigma lenses) 4287 7 => '0.6 m', #PH (NC) 4288 8 => '0.7 m', # (plus Sigma 55-200) 4289 9 => '0.8-0.9 m', #PH (NC) Tokina 28-70/2.6-2.8 4290 10 => '1.0 m', # (plus Sigma 70 macro) 4291 11 => '1.1-1.2 m', 4292 12 => '1.4-1.5 m', 4293 13 => '1.5 m', # Sigma 70-300/4-5.6 macro 4294 14 => '2.0 m', 4295 15 => '2.0-2.1 m', #PH (NC) 4296 16 => '2.1 m', # Sigma 135-400 APO & DG: 2.0-2.2m 4297 17 => '2.2-2.9 m', #PH (NC) 4298 18 => '3.0 m', # Sigma 50-500 : 1.0-3.0m depending on the focal length 4299 ## 50mm, 100mm => 1.0m 4300 ## 200mm => 1.1m 4301 ## 300mm => 1.5m 4302 ## 400mm => 2.2m 4303 ## 500mm => 3.0m 4304 19 => '4-5 m', #PH (NC) 4305 20 => '5.6 m', # Pentax DA 560 4306 # To check: Sigma 120-400 OS: MFD 1.5m 4307 # To check: Sigma 150-500 OS: MFD 2.2m 4308 # To check: Sigma 50-500 has MFD 50-180cm 4309 # 0xd0 - seen for the Sigma 4.5mm F2.8 EX DC HSM Circular Fisheye (ref PH) 4310 }, 4311 }, 4312 3.1 => { #29 4313 Name => 'FocusRangeIndex', 4314 Mask => 0x07, 4315 PrintConv => { 4316 7 => '0 (very close)', 4317 6 => '1 (close)', 4318 4 => '2', 4319 5 => '3', 4320 1 => '4', 4321 0 => '5', 4322 2 => '6 (far)', 4323 3 => '7 (very far)', 3030 4324 }, 3031 4325 }, … … 3034 4328 %lensCode, 3035 4329 }, 3036 5 => { # LC4 = ab beration correction, near distance data4330 5 => { # LC4 = aberration correction, near distance data 3037 4331 Name => 'LC4', 3038 4332 %lensCode, 3039 4333 }, 3040 6 => { # LC5 = light color ab beration correction data4334 6 => { # LC5 = light color aberration correction data 3041 4335 Name => 'LC5', 3042 4336 %lensCode, 3043 4337 }, 3044 7 => { # LC6 = open ab beration data4338 7 => { # LC6 = open aberration data 3045 4339 Name => 'LC6', 3046 4340 %lensCode, … … 3050 4344 %lensCode, 3051 4345 }, 3052 9 => { # LC8 = focal length data 3053 Name => 'FocalLength', 4346 9 => [{ # LC8 = focal length data 4347 Name => 'LensFocalLength', 4348 Notes => 'focal length of lens alone, without adapter', #PH 3054 4349 Priority => 0, 4350 Condition => '$$self{Model} !~ /645Z/', #PH (doesn't work for 645Z) 3055 4351 ValueConv => '10*($val>>2) * 4**(($val&0x03)-2)', #JD 3056 4352 ValueConvInv => q{ … … 3061 4357 PrintConv => 'sprintf("%.1f mm", $val)', 3062 4358 PrintConvInv => '$val=~s/\s*mm//; $val', 3063 }, 4359 },{ 4360 Name => 'LC8', 4361 %lensCode, 4362 }], 3064 4363 # the following aperture values change with focal length 3065 4364 10 => { # LC9 = nominal AVmin/AVmax data (open/closed aperture values) 3066 4365 Name => 'NominalMaxAperture', 3067 4366 Mask => 0xf0, 3068 ValueConv => '2**( ($val>>4)/4)', #JD3069 ValueConvInv => '4*log($val)/log(2) << 4',4367 ValueConv => '2**($val/4)', #JD 4368 ValueConvInv => '4*log($val)/log(2)', 3070 4369 PrintConv => 'sprintf("%.1f", $val)', 3071 4370 PrintConvInv => '$val', … … 3087 4386 %lensCode, 3088 4387 }, 4388 12.1 => { 4389 Name => 'NewLensDataHook', 4390 Hidden => 1, 4391 Hook => '$varSize += 1 if $$self{NewLensData}', 4392 RawConv => 'undef', 4393 }, 3089 4394 13 => { # LC12 = mv1 AVminsif data 3090 4395 Name => 'LC12', 4396 Notes => "ID's 13-16 are offset by 1 for the K-r, K-5 and K-5II", #29 3091 4397 %lensCode, 3092 4398 }, 4399 # 14 - related to live view for K-5 (normally 3, but 1 or 5 in LV mode) 3093 4400 14.1 => { # LC13 = AVmin (open aperture value) [MaxAperture=(2**((AVmin-1)/32))] 3094 4401 Name => 'MaxAperture', 4402 Condition => '$$self{Model} ne "K-5"', 3095 4403 Notes => 'effective wide open aperture for current focal length', 3096 4404 Mask => 0x7f, # (not sure what the high bit indicates) … … 3307 4615 # I've also seen: 0x42 (K2000), 0xf2 (K-7,K-r,K-5), 0x12,0x22 (K-x) - PH 3308 4616 PrintConv => { 4617 1 => 'Camera Battery', #PH (NC, GR III) 3309 4618 2 => 'Body Battery', 3310 4619 3 => 'Grip Battery', … … 3315 4624 { 3316 4625 Name => 'BodyBatteryState', 3317 Condition => '$$self{Model} =~ /(\*ist|K100D|K200D|K10D|GX10|K20D|GX20 )\b/',4626 Condition => '$$self{Model} =~ /(\*ist|K100D|K200D|K10D|GX10|K20D|GX20|GX-1[LS]?)\b/', 3318 4627 Notes => '*istD, K100D, K200D, K10D and K20D', 3319 4628 Mask => 0xf0, 3320 4629 PrintConv => { #19 3321 0x10=> 'Empty or Missing',3322 0x20=> 'Almost Empty',3323 0x30=> 'Running Low',3324 0x40=> 'Full',4630 1 => 'Empty or Missing', 4631 2 => 'Almost Empty', 4632 3 => 'Running Low', 4633 4 => 'Full', 3325 4634 }, 3326 4635 },{ 3327 4636 Name => 'BodyBatteryState', 3328 Condition => '$$self{Model} =~ /(K-5|K-7|K-r|K-x|645D)\b/',3329 Notes => ' K-5, K-7, K-r, K-x and 645D',4637 Condition => '$$self{Model} !~ /(K110D|K2000|K-m)\b/', 4638 Notes => 'other models except the K110D, K2000 and K-m', 3330 4639 Mask => 0xf0, 3331 4640 PrintConv => { 3332 0x10=> 'Empty or Missing',3333 0x20=> 'Almost Empty',3334 0x30=> 'Running Low',3335 0x40=> 'Close to Full',3336 0x50=> 'Full',4641 1 => 'Empty or Missing', 4642 2 => 'Almost Empty', 4643 3 => 'Running Low', 4644 4 => 'Close to Full', 4645 5 => 'Full', 3337 4646 }, 3338 4647 },{ … … 3340 4649 Notes => 'decoding unknown for other models', 3341 4650 Mask => 0xf0, 3342 ValueConv => '$val >> 4',3343 ValueConvInv => '$val << 4',3344 4651 }, 3345 4652 ], … … 3351 4658 Mask => 0x0f, 3352 4659 PrintConv => { #19 3353 0x01 => 'Empty or Missing',3354 0x02 => 'Almost Empty',3355 0x03 => 'Running Low',3356 0x04 => 'Full',4660 1 => 'Empty or Missing', 4661 2 => 'Almost Empty', 4662 3 => 'Running Low', 4663 4 => 'Full', 3357 4664 }, 3358 4665 },{ … … 3379 4686 Name => 'BodyBatteryADNoLoad', 3380 4687 Description => 'Body Battery A/D No Load', 3381 Condition => '$$self{Model} =~ /(\*ist|K100D|K200D )\b/',4688 Condition => '$$self{Model} =~ /(\*ist|K100D|K200D|GX-1[LS]?)\b/', 3382 4689 }, 3383 4690 { 3384 4691 Name => 'BodyBatteryVoltage1', # (static?) 3385 Condition => '$$self{Model} =~ /(K-5|K-7|K-r|K-x|645D)\b/',4692 Condition => '$$self{Model} !~ /(K100D|K110D|K2000|K-m|Q\d*)\b/', 3386 4693 Format => 'int16u', 3387 4694 ValueConv => '$val / 100', … … 3389 4696 PrintConv => 'sprintf("%.2f V", $val)', 3390 4697 PrintConvInv => '$val =~ s/\s*V$//', 3391 # For my K-5: Min (0%) Max (100%) Meas4698 # For my K-5: Min (0%) Max (100%) At Meas 3392 4699 # BodyBatteryVoltage1 6.24 V 7.75 V 7.66 V 3393 4700 # BodyBatteryVoltage2 5.98 V 7.43 V 7.34 V … … 3418 4725 Name => 'GripBatteryADNoLoad', 3419 4726 Description => 'Grip Battery A/D No Load', 3420 Condition => '$$self{Model} =~ /(\*ist|K10D|GX10|K20D|GX20 )\b/',4727 Condition => '$$self{Model} =~ /(\*ist|K10D|GX10|K20D|GX20|GX-1[LS]?)\b/', 3421 4728 }, 3422 4729 { 3423 4730 Name => 'BodyBatteryVoltage2', # (less than BodyBatteryVoltage1 -- under load?) 3424 Condition => '$$self{Model} =~ /(K-5|K-7|K-r|K-x|645D)\b/',4731 Condition => '$$self{Model} !~ /(K100D|K110D|K2000|K-m|Q\d*)\b/', 3425 4732 Format => 'int16u', 3426 4733 ValueConv => '$val / 100', … … 3472 4779 PrintConvColumns => 2, 3473 4780 PrintConv => { 4781 0 => '(none)', 3474 4782 0x07ff => 'All', 3475 4783 0x0777 => 'Central 9 points', … … 3533 4841 0x0b => { #JD 3534 4842 Name => 'AFPointsInFocus', 4843 Condition => '$$self{Model} !~ /K-[13]\b/', 3535 4844 Notes => q{ 3536 may report two points in focus even though a single AFPoint has been 3537 selected, in which case the selected AFPoint is the first reported 4845 models other than the K-1 and K-3. May report two points in focus even 4846 though a single AFPoint has been selected, in which case the selected 4847 AFPoint is the first reported 3538 4848 }, 3539 4849 PrintConvColumns => 2, … … 3562 4872 }, 3563 4873 }, 4874 0x1fd => { 4875 Name => 'AFHold', 4876 Notes => 'decoded only for the K-3 II', 4877 Condition => '$$self{Model} eq "PENTAX K-3 II"', 4878 PrintConv => { 0 => 'Off', 1 => 'Short', 2 => 'Medium', 3 => 'Long' }, 4879 }, 4880 ); 4881 4882 # Kelvin white balance information (ref 28, topic 4834) 4883 %Image::ExifTool::Pentax::KelvinWB = ( 4884 %binaryDataAttrs, 4885 FORMAT => 'int16u', 4886 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 4887 NOTES => 'White balance Blue/Red gains as a function of color temperature.', 4888 1 => { Name => 'KelvinWB_Daylight', %kelvinWB }, 4889 5 => { Name => 'KelvinWB_01', %kelvinWB }, 4890 9 => { Name => 'KelvinWB_02', %kelvinWB }, 4891 13 => { Name => 'KelvinWB_03', %kelvinWB }, 4892 17 => { Name => 'KelvinWB_04', %kelvinWB }, 4893 21 => { Name => 'KelvinWB_05', %kelvinWB }, 4894 25 => { Name => 'KelvinWB_06', %kelvinWB }, 4895 29 => { Name => 'KelvinWB_07', %kelvinWB }, 4896 33 => { Name => 'KelvinWB_08', %kelvinWB }, 4897 37 => { Name => 'KelvinWB_09', %kelvinWB }, 4898 41 => { Name => 'KelvinWB_10', %kelvinWB }, 4899 45 => { Name => 'KelvinWB_11', %kelvinWB }, 4900 49 => { Name => 'KelvinWB_12', %kelvinWB }, 4901 53 => { Name => 'KelvinWB_13', %kelvinWB }, 4902 57 => { Name => 'KelvinWB_14', %kelvinWB }, 4903 61 => { Name => 'KelvinWB_15', %kelvinWB }, 4904 65 => { Name => 'KelvinWB_16', %kelvinWB }, 3564 4905 ); 3565 4906 … … 3574 4915 }, 3575 4916 17 => { 3576 Name => 'WBShift MG',4917 Name => 'WBShiftGM', 3577 4918 Notes => 'positive is a shift toward green', 3578 4919 }, … … 3606 4947 1 => { # (presumably this is from an orientation sensor) 3607 4948 Name => 'CameraOrientation', 3608 Condition => '$$self{Model} =~ /K- [^m]/',4949 Condition => '$$self{Model} =~ /K-(5|7|r|x)\b/', 3609 4950 Notes => 'K-5, K-7, K-r and K-x', 3610 4951 PrintHex => 1, … … 3970 5311 The parameters associated with each type of digital filter are unique, and 3971 5312 these settings are also extracted with the DigitalFilter tag. Information 3972 is not extracted for filters that are "Off" unless the Unknownoption is5313 is not extracted for filters that are "Off" unless the L<Unknown|../ExifTool.html#Unknown> option is 3973 5314 used. 3974 5315 }, … … 4008 5349 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 4009 5350 FORMAT => 'int8s', 4010 NOTES => 'Tags decoded from the electronic level information.', 5351 NOTES => q{ 5352 Tags decoded from the electronic level information for the K-5. May not be 5353 valid for other models. 5354 }, 4011 5355 0 => { 4012 5356 Name => 'LevelOrientation', … … 4014 5358 PrintHex => 0, 4015 5359 PrintConv => { 5360 0 => 'n/a', #PH (NC, GR III) 4016 5361 1 => 'Horizontal (normal)', 4017 5362 2 => 'Rotate 180', … … 4030 5375 Mask => 0xf0, 4031 5376 PrintConv => { 4032 0 x00=> 'Off',4033 0x20=> 'Composition Adjust',4034 0xa0 => 'Composition Adjust + Horizon Correction',4035 0xc0=> 'Horizon Correction',5377 0 => 'Off', 5378 2 => 'Composition Adjust', 5379 10 => 'Composition Adjust + Horizon Correction', 5380 12 => 'Horizon Correction', 4036 5381 }, 4037 5382 }, 4038 5383 1 => { 4039 5384 Name => 'RollAngle', 4040 Notes => ' degrees of clockwise camera rotation',5385 Notes => 'converted to degrees of clockwise camera rotation', 4041 5386 ValueConv => '-$val / 2', 4042 5387 ValueConvInv => '-$val * 2', … … 4044 5389 2 => { 4045 5390 Name => 'PitchAngle', 4046 Notes => ' degrees of upward camera tilt',5391 Notes => 'converted to degrees of upward camera tilt', 4047 5392 ValueConv => '-$val / 2', 4048 5393 ValueConvInv => '-$val * 2', … … 4070 5415 ); 4071 5416 4072 # temperature information for the K5 - PH 4073 %Image::ExifTool::Pentax::TempInfoK5 = ( 5417 # white balance RGGB levels (ref 28) 5418 %Image::ExifTool::Pentax::WBLevels = ( 5419 %binaryDataAttrs, 5420 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 5421 # 0 - 11 (number of entries in this table) 5422 # 1 - 0 5423 2 => { 5424 Name => 'WB_RGGBLevelsDaylight', 5425 Format => 'int16u[4]', 5426 }, 5427 # 10 - 1 5428 11 => { 5429 Name => 'WB_RGGBLevelsShade', 5430 Format => 'int16u[4]', 5431 }, 5432 # 19 - 2 5433 20 => { 5434 Name => 'WB_RGGBLevelsCloudy', 5435 Format => 'int16u[4]', 5436 }, 5437 # 28 - 3 5438 29 => { 5439 Name => 'WB_RGGBLevelsTungsten', 5440 Format => 'int16u[4]', 5441 }, 5442 # 37 - 4 5443 38 => { 5444 Name => 'WB_RGGBLevelsFluorescentD', 5445 Format => 'int16u[4]', 5446 }, 5447 # 46 - 5 5448 47 => { 5449 Name => 'WB_RGGBLevelsFluorescentN', 5450 Format => 'int16u[4]', 5451 }, 5452 # 55 - 6 5453 56 => { 5454 Name => 'WB_RGGBLevelsFluorescentW', 5455 Format => 'int16u[4]', 5456 }, 5457 # 64 - 7 5458 65 => { 5459 Name => 'WB_RGGBLevelsFlash', 5460 Format => 'int16u[4]', 5461 }, 5462 # 73 - 8 5463 74 => { 5464 Name => 'WB_RGGBLevelsFluorescentL', 5465 Format => 'int16u[4]', 5466 }, 5467 # 82 - 0xfe 5468 83 => { 5469 Name => 'WB_RGGBLevelsUnknown', 5470 Format => 'int16u[4]', 5471 Unknown => 1, 5472 }, 5473 # 91 - 0xff 5474 92 => { 5475 Name => 'WB_RGGBLevelsUserSelected', 5476 Format => 'int16u[4]', 5477 }, 5478 ); 5479 5480 # lens information for Penax Q (ref PH) 5481 # (306 bytes long, I wonder if this contains vignetting information too?) 5482 %Image::ExifTool::Pentax::LensInfoQ = ( 5483 %binaryDataAttrs, 5484 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 5485 NOTES => 'More lens information stored by the Pentax Q.', 5486 0x0c => { 5487 Name => 'LensModel', 5488 Format => 'string[30]', 5489 }, 5490 0x2a => { 5491 Name => 'LensInfo', 5492 Format => 'string[20]', 5493 ValueConv => '$val=~s/mm/mm /; $val', 5494 ValueConvInv => '$val=~tr/ //d; $val', 5495 } 5496 ); 5497 5498 # Pixel shift information for the K-3II (ref PH) 5499 %Image::ExifTool::Pentax::PixelShiftInfo = ( 5500 %binaryDataAttrs, 5501 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 5502 NOTES => 'Pixel shift information stored by the K-3 II.', 5503 0x00 => { 5504 Name => 'PixelShiftResolution', 5505 PrintConv => { 0 => 'Off', 1 => 'On' }, 5506 }, 5507 ); 5508 5509 # AF point information for the K-1 (ref 29) 5510 %Image::ExifTool::Pentax::AFPointInfo = ( 5511 %binaryDataAttrs, 5512 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 5513 NOTES => 'AF point information written by the K-1.', 5514 # 0 - int16u: 1 (version?) 5515 2 => { 5516 Name => 'NumAFPoints', 5517 Format => 'int16u', 5518 }, 5519 4 => { 5520 Name => 'AFPointsInFocus', 5521 Condition => '$$self{Model} =~ /K-1\b/', 5522 Format => 'int8u[9]', 5523 PrintConv => 'Image::ExifTool::Pentax::DecodeAFPoints($val,33,2,0x02)', 5524 }, 5525 4.1 => { 5526 Name => 'AFPointsSelected', 5527 Condition => '$$self{Model} =~ /K-1\b/', 5528 Format => 'int8u[9]', 5529 PrintConv => 'Image::ExifTool::Pentax::DecodeAFPoints($val,33,2,0x03)', 5530 }, 5531 4.2 => { 5532 Name => 'AFPointsSpecial', 5533 Condition => '$$self{Model} =~ /K-1\b/', 5534 Format => 'int8u[9]', 5535 PrintConv => 'Image::ExifTool::Pentax::DecodeAFPoints($val,33,2,0x03,0x03)', 5536 }, 5537 ); 5538 5539 # temperature information for some models - PH 5540 %Image::ExifTool::Pentax::TempInfo = ( 4074 5541 %binaryDataAttrs, 4075 5542 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 4076 5543 NOTES => q{ 4077 5544 A number of additional temperature readings are extracted from this 256-byte 4078 binary-data block in images from the K-5. It is not currently known where 4079 the corresponding temperature sensors are located in the camera. 5545 binary-data block in images from models such as the K-01, K-3, K-5, K-50 and 5546 K-500. It is currently not known where the corresponding temperature 5547 sensors are located in the camera. 4080 5548 }, 4081 5549 # (it would be nice to know where these temperature sensors are located, … … 4085 5553 # more quickly than CameraTemperature when shooting video.) 4086 5554 0x0c => { 4087 Name => ' CameraTemperature2',5555 Name => 'SensorTemperature', #forum6677 (was CameraTemperature2) 4088 5556 Format => 'int16s', 4089 5557 ValueConv => '$val / 10', … … 4093 5561 }, 4094 5562 0x0e => { 4095 Name => ' CameraTemperature3',5563 Name => 'SensorTemperature2', #forum6677 (was CameraTemperature3) 4096 5564 Format => 'int16s', 4097 5565 ValueConv => '$val / 10', … … 4102 5570 0x14 => { 4103 5571 Name => 'CameraTemperature4', 5572 Condition => '$$self{Model} =~ /K-5\b/', 4104 5573 Format => 'int16s', 4105 5574 PrintConv => '"$val C"', … … 4108 5577 0x16 => { # usually the same as CameraTemperature4, but not always 4109 5578 Name => 'CameraTemperature5', 5579 Condition => '$$self{Model} =~ /K-5\b/', 4110 5580 Format => 'int16s', 4111 5581 PrintConv => '"$val C"', 4112 5582 PrintConvInv => '$val=~s/ ?c$//i; $val', 4113 5583 }, 5584 # 0x18,0x1a,0x1c,0x1e = int16u[4] BlackPoint - PH 4114 5585 ); 4115 5586 … … 4221 5692 1600 => 1600, #PH 4222 5693 3200 => 3200, #PH 5694 65534 => 'Auto 2', #PH (Q-S1 MOV) [how is this different from 65535?] 5695 65535 => 'Auto', #PH (K-S1 MOV) 4223 5696 }, 4224 5697 }, … … 4271 5744 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 4272 5745 FIRST_ENTRY => 0, 4273 NOTES => 'This information is found in Pentax MOV videos.',5746 NOTES => 'This information is found in MOV videos from cameras such as the Optio WP.', 4274 5747 0x00 => { 4275 5748 Name => 'Make', … … 4326 5799 Start => 10, 4327 5800 Base => '$start', 4328 ByteOrder => 'BigEndian', 4329 }, 5801 ByteOrder => 'Unknown', # K-70 is little-endian, K-x is big-endian 5802 }, 5803 }, 5804 mknt => { # (Q-S1) 5805 Name => 'MakerNotes', 5806 SubDirectory => { 5807 TagTable => 'Image::ExifTool::Pentax::Main', 5808 Start => 10, 5809 Base => '$start', 5810 ByteOrder => 'Unknown', 5811 }, 5812 }, 5813 ); 5814 5815 # Pentax metadata in S1 AVI maker notes (PH) 5816 %Image::ExifTool::Pentax::S1 = ( 5817 NOTES => 'Tags extracted from the maker notes of AVI videos from the Optio S1.', 5818 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 5819 0x0000 => { #5 5820 Name => 'MakerNoteVersion', 5821 Writable => 'undef', 5822 Count => 4, 4330 5823 }, 4331 5824 ); … … 4338 5831 0x0c => { 4339 5832 Name => 'Model', 5833 Description => 'Camera Model Name', 4340 5834 Format => 'string[32]', 5835 }, 5836 ); 5837 5838 # PreviewImage information found in PXTH atom of K-01 MOV videos 5839 %Image::ExifTool::Pentax::PXTH = ( 5840 NOTES => 'Tags found in the PXTH atom of MOV videos from the K-01.', 5841 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData, 5842 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 5843 0x00 => { 5844 Name => 'PreviewImageLength', 5845 Format => 'int32u', 5846 }, 5847 0x04 => { 5848 Name => 'PreviewImage', 5849 Groups => { 2 => 'Preview' }, 5850 Format => 'undef[$val{0}]', 5851 Notes => '640-pixel-wide JPEG preview', # (360 pixels high, may depend on aspect ratio) 5852 RawConv => '$self->ValidateImage(\$val,$tag)', 5853 }, 5854 ); 5855 5856 # information in PENT atom of MOV videos from the Optio WG-2 GPS 5857 %Image::ExifTool::Pentax::PENT = ( 5858 NOTES => 'Tags found in the PENT atom of MOV videos from the Optio WG-2 GPS.', 5859 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData, 5860 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 5861 0 => { 5862 Name => 'Make', 5863 Format => 'string[24]', 5864 }, 5865 0x1a => { 5866 Name => 'Model', 5867 Description => 'Camera Model Name', 5868 Format => 'string[24]', 5869 }, 5870 0x38 => { #(NC) 5871 Name => 'ExposureTime', 5872 Format => 'int32u', 5873 ValueConv => '$val ? 10 / $val : 0', 5874 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)', 5875 }, 5876 0x3c => { 5877 Name => 'FNumber', 5878 Format => 'rational64u', 5879 PrintConv => 'sprintf("%.1f",$val)', 5880 }, 5881 0x44 => { #(NC) 5882 Name => 'ExposureCompensation', 5883 Format => 'rational64s', 5884 PrintConv => '$val ? sprintf("%+.1f", $val) : 0', 5885 }, 5886 0x54 => { #(NC) 5887 Name => 'FocalLength', 5888 Format => 'int32u', 5889 PrintConv => '"$val mm"', 5890 }, 5891 0x71 => { 5892 Name => 'DateTime1', 5893 Format => 'string[24]', 5894 Groups => { 2 => 'Time' }, 5895 }, 5896 0x8b => { 5897 Name => 'DateTime2', 5898 Format => 'string[24]', 5899 Groups => { 2 => 'Time' }, 5900 }, 5901 0xa7 => { #(NC) 5902 Name => 'ISO', 5903 Format => 'int32u', 5904 }, 5905 0xc7 => { 5906 Name => 'GPSVersionID', 5907 Format => 'undef[8]', 5908 Groups => { 1 => 'GPS', 2 => 'Location' }, 5909 DataMember => 'GPSVersionID', 5910 RawConv => '$$self{GPSVersionID} = ($val=~s/GPS_// ? join(" ",unpack("C*",$val)) : undef)', 5911 PrintConv => '$val =~ tr/ /./; $val', 5912 }, 5913 0xcf => { 5914 Name => 'GPSLatitudeRef', 5915 Condition => '$$self{GPSVersionID}', 5916 Format => 'string[2]', 5917 Groups => { 1 => 'GPS', 2 => 'Location' }, 5918 PrintConv => { 5919 N => 'North', 5920 S => 'South', 5921 }, 5922 }, 5923 0xd1 => { 5924 Name => 'GPSLatitude', 5925 Condition => '$$self{GPSVersionID}', 5926 Format => 'rational64u[3]', 5927 Groups => { 1 => 'GPS', 2 => 'Location' }, 5928 ValueConv => 'Image::ExifTool::GPS::ToDegrees($val)', 5929 PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1)', 5930 }, 5931 0xe9 => { 5932 Name => 'GPSLongitudeRef', 5933 Condition => '$$self{GPSVersionID}', 5934 Format => 'string[2]', 5935 Groups => { 1 => 'GPS', 2 => 'Location' }, 5936 PrintConv => { 5937 E => 'East', 5938 W => 'West', 5939 }, 5940 }, 5941 0xeb => { 5942 Name => 'GPSLongitude', 5943 Condition => '$$self{GPSVersionID}', 5944 Format => 'rational64u[3]', 5945 Groups => { 1 => 'GPS', 2 => 'Location' }, 5946 ValueConv => 'Image::ExifTool::GPS::ToDegrees($val)', 5947 PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1)', 5948 }, 5949 0x103 => { 5950 Name => 'GPSAltitudeRef', 5951 Condition => '$$self{GPSVersionID}', 5952 Format => 'int8u', 5953 Groups => { 1 => 'GPS', 2 => 'Location' }, 5954 PrintConv => { 5955 0 => 'Above Sea Level', 5956 1 => 'Below Sea Level', 5957 }, 5958 }, 5959 0x104 => { 5960 Name => 'GPSAltitude', 5961 Condition => '$$self{GPSVersionID}', 5962 Format => 'rational64u', 5963 Groups => { 1 => 'GPS', 2 => 'Location' }, 5964 PrintConv => '$val =~ /^(inf|undef)$/ ? $val : "$val m"', 5965 }, 5966 0x11c => { 5967 Name => 'GPSTimeStamp', 5968 Condition => '$$self{GPSVersionID}', 5969 Groups => { 1 => 'GPS', 2 => 'Time' }, 5970 Format => 'rational64u[3]', 5971 ValueConv => 'Image::ExifTool::GPS::ConvertTimeStamp($val)', 5972 PrintConv => 'Image::ExifTool::GPS::PrintTimeStamp($val)', 5973 }, 5974 0x134 => { 5975 Name => 'GPSSatellites', 5976 Condition => '$$self{GPSVersionID}', 5977 Format => 'string[3]', 5978 Groups => { 1 => 'GPS', 2 => 'Location' }, 5979 }, 5980 0x137 => { 5981 Name => 'GPSStatus', 5982 Condition => '$$self{GPSVersionID}', 5983 Format => 'string[2]', 5984 Groups => { 1 => 'GPS', 2 => 'Location' }, 5985 PrintConv => { 5986 A => 'Measurement Active', 5987 V => 'Measurement Void', 5988 }, 5989 }, 5990 0x139 => { 5991 Name => 'GPSMeasureMode', 5992 Condition => '$$self{GPSVersionID}', 5993 Format => 'string[2]', 5994 Groups => { 1 => 'GPS', 2 => 'Location' }, 5995 PrintConv => { 5996 2 => '2-Dimensional Measurement', 5997 3 => '3-Dimensional Measurement', 5998 }, 5999 }, 6000 0x13b => { 6001 Name => 'GPSMapDatum', 6002 Condition => '$$self{GPSVersionID}', 6003 Format => 'string[7]', 6004 Groups => { 1 => 'GPS', 2 => 'Location' }, 6005 }, 6006 0x142 => { 6007 Name => 'GPSDateStamp', 6008 Condition => '$$self{GPSVersionID}', 6009 Groups => { 1 => 'GPS', 2 => 'Time' }, 6010 Format => 'string[11]', 6011 ValueConv => 'Image::ExifTool::Exif::ExifDate($val)', 6012 }, 6013 0x173 => { #(NC) 6014 Name => 'AudioCodecID', 6015 Format => 'string[4]', 6016 }, 6017 0x7d3 => { 6018 Name => 'PreviewImage', 6019 Groups => { 2 => 'Preview' }, 6020 Format => 'undef[$size-0x7d3]', 6021 Notes => '640x480 JPEG preview image', # (black borders pad to 480 pixels high) 6022 RawConv => '$self->ValidateImage(\$val,$tag)', 6023 }, 6024 ); 6025 6026 # tags in Pentax Optio RZ18 AVI videos (ref PH) 6027 # (very similar to Olympus::AVI tags) 6028 %Image::ExifTool::Pentax::Junk2 = ( 6029 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData, 6030 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' }, 6031 FIRST_ENTRY => 0, 6032 NOTES => 'This information is found in AVI videos from the Optio RZ18.', 6033 0x12 => { 6034 Name => 'Make', 6035 Format => 'string[24]', 6036 }, 6037 0x2c => { 6038 Name => 'Model', 6039 Description => 'Camera Model Name', 6040 Format => 'string[24]', 6041 }, 6042 0x5e => { 6043 Name => 'FNumber', 6044 Format => 'rational64u', 6045 PrintConv => 'sprintf("%.1f",$val)', 6046 }, 6047 0x83 => { 6048 Name => 'DateTime1', 6049 Format => 'string[24]', 6050 Groups => { 2 => 'Time' }, 6051 }, 6052 0x9d => { 6053 Name => 'DateTime2', 6054 Format => 'string[24]', 6055 Groups => { 2 => 'Time' }, 6056 }, 6057 0x12b => { 6058 Name => 'ThumbnailWidth', 6059 Format => 'int16u', 6060 }, 6061 0x12d => { 6062 Name => 'ThumbnailHeight', 6063 Format => 'int16u', 6064 }, 6065 0x12f => { 6066 Name => 'ThumbnailLength', 6067 Format => 'int32u', 6068 }, 6069 0x133 => { 6070 Name => 'ThumbnailImage', 6071 Groups => { 2 => 'Preview' }, 6072 Format => 'undef[$val{0x12f}]', 6073 Notes => '160x120 JPEG thumbnail image', 6074 RawConv => '$self->ValidateImage(\$val,$tag)', 4341 6075 }, 4342 6076 ); … … 4409 6143 4410 6144 #------------------------------------------------------------------------------ 6145 # Decode AF bit mask (ref 29) 6146 # Inputs: 0) raw binary value, 1) number of AF points, 2) number of bits per AF point, 6147 # 3) bit mask, 4) bit value (undef for any bit set) 6148 sub DecodeAFPoints($$$$;$) 6149 { 6150 my ($val, $num, $bits, $mask, $bitVal) = @_; 6151 my @bytes = split ' ', $val; 6152 my $i = 1; # (starts at AF point number 1) 6153 my $shift = 8 - $bits; 6154 my $byte = shift @bytes; 6155 my @bitList; 6156 for (;;) { 6157 if ($bitVal) { 6158 push @bitList, $i if (($byte >> $shift) & $mask) == $bitVal; 6159 } else { 6160 push @bitList, $i if ($byte >> $shift) & $mask; 6161 } 6162 last if ++$i > $num; 6163 $shift -= $bits; 6164 if ($shift < 0) { 6165 last unless @bytes; 6166 $byte = shift @bytes; 6167 $shift += 8; 6168 } 6169 } 6170 return join(',', @bitList); 6171 } 6172 6173 #------------------------------------------------------------------------------ 4411 6174 # Convert Pentax hex-based EV (modulo 8) to real number 4412 6175 # Inputs: 0) value to convert 4413 # ie) 0x00 -> 06176 # eg) 0x00 -> 0 4414 6177 # 0x03 -> 0.33333 4415 6178 # 0x04 -> 0.5 … … 4456 6219 sub CryptShutterCount($$) 4457 6220 { 4458 my ($val, $e xifTool) = @_;6221 my ($val, $et) = @_; 4459 6222 # Pentax Date and Time values are used in the encryption 4460 return undef unless $$e xifTool{PentaxDate} and $$exifTool{PentaxTime} and4461 length($$e xifTool{PentaxDate})==4 and length($$exifTool{PentaxTime})>=3;6223 return undef unless $$et{PentaxDate} and $$et{PentaxTime} and 6224 length($$et{PentaxDate})==4 and length($$et{PentaxTime})>=3; 4462 6225 # get Date and Time as integers (after padding Time with a null byte) 4463 my $date = unpack('N', $$e xifTool{PentaxDate});4464 my $time = unpack('N', $$e xifTool{PentaxTime} . "\0");6226 my $date = unpack('N', $$et{PentaxDate}); 6227 my $time = unpack('N', $$et{PentaxTime} . "\0"); 4465 6228 return $val ^ $date ^ (0xffffffff - $time); 4466 6229 } … … 4488 6251 I couldn't find a good source for Pentax maker notes information, but I've 4489 6252 managed to discover a fair bit of information by analyzing sample images 4490 downloaded from the internet, and through tests with my own Optio WP,4491 K10D,and K-5, and with help provided by other ExifTool users (see6253 downloaded from the internet, and through tests with my own Optio S, Optio 6254 WP, K10D, K-01 and K-5, and with help provided by other ExifTool users (see 4492 6255 L</ACKNOWLEDGEMENTS>). 4493 6256 … … 4521 6284 =head1 ACKNOWLEDGEMENTS 4522 6285 4523 Thanks to Wayne Smith, John Francis, Douglas O'Brien Cvetan Ivanov, Jens4524 Duttke and Dave Nicholson for help figuring out some Pentax tags, Ger4525 Vermeulen and Niels Kristian Bech Jensen for contributing print conversion 4526 values for some tags, and everyone who helped contribute to the LensType4527 values.6286 Thanks to Wayne Smith, John Francis, Douglas O'Brien, Cvetan Ivanov, Jens 6287 Duttke, Dave Nicholson, Iliah Borg, Klaus Homeister, Louis Granboulan and 6288 Andras Salamon for help figuring out some Pentax tags, Ger Vermeulen and 6289 Niels Kristian Bech Jensen for contributing print conversion values for some 6290 tags, and everyone who helped contribute to the LensType values. 4528 6291 4529 6292 =head1 AUTHOR 4530 6293 4531 Copyright 2003-20 11, Phil Harvey (phil at owl.phy.queensu.ca)6294 Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com) 4532 6295 4533 6296 This library is free software; you can redistribute it and/or modify it
Note:
See TracChangeset
for help on using the changeset viewer.