55
59
'3 22' => 'smc PENTAX-F FISH-EYE 17-28mm F3.5-4.5',
56
60
'3 23' => 'smc PENTAX-F 100-300mm F4.5-5.6',
57
61
'3 24' => 'smc PENTAX-F 35-135mm F3.5-4.5',
58
'3 25' => 'smc PENTAX-F 35-105mm F4-5.6 or SIGMA AF 28-300 F3.5-5.6 DL IF', #11 (sigma)
62
'3 25' => 'smc PENTAX-F 35-105mm F4-5.6 or SIGMA or Tokina',
63
# or '3 25' => SIGMA AF 28-300 F3.5-5.6 DL IF', #11
59
64
# or '3 25' => 'Tokina 80-200mm F2.8 ATX-Pro', #12
65
# or '3 25' => 'SIGMA 55-200mm F4-5.6 DC', #19
60
66
'3 26' => 'smc PENTAX-F* 250-600mm F5.6 ED[IF]',
61
67
'3 27' => 'smc PENTAX-F 28-80mm F3.5-4.5',
62
68
'3 28' => 'smc PENTAX-F 35-70mm F3.5-4.5',
73
79
'3 38' => 'smc PENTAX-F* 300mm F4.5 ED[IF]',
74
80
'3 39' => 'smc PENTAX-F* 600mm F4 ED[IF]',
75
81
'3 40' => 'smc PENTAX-F MACRO 100mm F2.8',
76
'3 41' => 'smc PENTAX-F MACRO 50mm F2.8',
77
'3 44' => 'SIGMA 18-50mm F3.5-5.6 DC, 12-24mm F4.5 EX DG or Tamron 35-90mm F4 AF', #4,12,12
82
'3 41' => 'smc PENTAX-F MACRO 50mm F2.8 or Sigma 50mm F2,8 MACRO', #4,16
83
#'3 44' => 'SIGMA 17-70mm F2.8-4.5 DC MACRO', (Bart Hickman)
84
#'3 44' => 'SIGMA 18-50mm F3.5-5.6 DC, 12-24mm F4.5 EX DG or Tamron 35-90mm F4 AF', #4,12,12
85
#'3 44' => 'SIGMA AF 10-20mm F4-5.6 EX DC', #19
86
'3 44' => 'Tamron 35-90mm F4 AF or various SIGMA models', #4,12,Bart,19
78
87
'3 46' => 'SIGMA APO 70-200mm F2.8 EX',
79
88
'3 50' => 'smc PENTAX-FA 28-70mm F4 AL',
80
89
'3 51' => 'SIGMA 28mm F1.8 EX DG ASPHERICAL MACRO',
81
90
'3 52' => 'smc PENTAX-FA 28-200mm F3.8-5.6 AL[IF]',
91
# or '3 52' => 'Tamron AF LD 28-200mm F3.8-5.6 (IF) Aspherical (171D), #19
82
92
'3 53' => 'smc PENTAX-FA 28-80mm F3.5-5.6 AL',
83
93
'3 247' => 'smc PENTAX-DA FISH-EYE 10-17mm F3.5-4.5 ED[IF]',
84
94
'3 248' => 'smc PENTAX-DA 12-24mm F4 ED AL[IF]',
92
102
# '3 255' => 'SIGMA DL-II 35-80mm F4-5.6', #12
93
103
# '3 255' => 'SIGMA DL Zoom 75-300mm F4-5.6', #12
94
104
# '3 255' => 'SIGMA DF EX Aspherical 28-70mm F2.8', #12
105
# '3 255' => 'SIGMA AF Tele 400mm F5.6 Multi-coated', #19
95
106
'4 1' => 'smc PENTAX-FA SOFT 28mm F2.8',
96
107
'4 2' => 'smc PENTAX-FA 80-320mm F4.5-5.6',
97
108
'4 3' => 'smc PENTAX-FA 43mm F1.9 Limited',
106
117
'4 24' => 'smc PENTAX-FA 77mm F1.8 Limited',
107
118
'4 25' => 'TAMRON SP AF 14mm F2.8', #13
108
119
'4 26' => 'smc PENTAX-FA MACRO 100mm F3.5',
109
'4 27' => 'TAMRON AF28-300mm F/3.5-6.3 LD Aspherical[IF]Macro (285D)',
120
'4 27' => 'TAMRON AF28-300mm F/3.5-6.3 LD Aspherical[IF] MACRO (285D)',
110
121
'4 28' => 'smc PENTAX-FA 35mm F2 AL',
122
'4 29' => 'TAMRON AF 28-200mm F/3.8-5.6 LD Super II MACRO (371D)', #19
111
123
'4 34' => 'smc PENTAX-FA 24-90mm F3.5-4.5 AL[IF]',
112
124
'4 35' => 'smc PENTAX-FA 100-300mm F4.7-5.8',
113
'4 36' => 'TAMRON AF70-300mm F/4-5.6 LD MACRO (572D)',
125
'4 36' => 'TAMRON AF70-300mm F/4-5.6 LD MACRO', # both 572D and A17 (Di) - ref 19
114
126
'4 37' => 'TAMRON SP AF 24-135mm F3.5-5.6 AD AL (190D)', #13
115
127
'4 38' => 'smc PENTAX-FA 28-105mm F3.2-4.5 AL[IF]',
116
128
'4 39' => 'smc PENTAX-FA 31mm F1.8AL Limited',
163
175
'6 13' => 'smc PENTAX-FA* 400mm F5.6 ED[IF]',
164
176
'6 14' => 'smc PENTAX-FA* MACRO 200mm F4 ED[IF]',
165
177
'7 0' => 'smc PENTAX-DA 21mm F3.2 AL Limited', #13
178
'7 238' => 'TAMRON AF 18-250mm F3.5-6.3 Di II LD Aspherical [IF] MACRO', #19
166
179
'7 243' => 'smc PENTAX-DA 70mm F2.4 Limited', #PH (K10D)
167
180
'7 244' => 'smc PENTAX-DA 21mm F3.2 AL Limited', #16
181
'8 241' => 'smc PENTAX-DA* 50-135mm F2.8 ED [IF] SDM', #19
182
'8 242' => 'smc PENTAX-DA* 16-50mm F2.8 ED AL [IF] SDM', #19
170
185
# Pentax model ID codes (PH)
312
335
PrintConv => '$val=~tr/ /./; $val',
313
336
PrintConvInv => '$val=~tr/./ /; $val',
316
Name => 'PentaxMode',
339
Name => 'PentaxModelType',
317
340
Writable => 'int16u',
341
# (values of 0-5 seem to group models into 6 categories, ref 13)
325
344
Name => 'PreviewImageSize',
326
345
Groups => { 2 => 'Image' },
327
346
Writable => 'int16u',
329
348
PrintConv => '$val =~ tr/ /x/; $val',
332
351
Name => 'PreviewImageLength',
333
352
OffsetPair => 0x0004, # point to associated offset
334
353
DataTag => 'PreviewImage',
556
579
ValueConv => '$val * 1e-5',
557
580
ValueConvInv => '$val * 1e5',
558
PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
559
PrintConvInv => 'eval $val',
581
# value may be 0xffffffff in Bulb mode (ref 19)
582
PrintConv => '$val > 42949 ? "Unknown (Bulb)" : Image::ExifTool::Exif::PrintExposureTime($val)',
583
PrintConvInv => '$val=~/(unknown|bulb)/i ? $val : eval $val',
562
586
Name => 'FNumber',
1026
1054
TagTable => 'Image::ExifTool::Pentax::SRInfo',
1058
# (used by all Pentax DSLR's except *istD and *istDS - PH)
1059
# The lowest decrypted values observed are 246 for the first image from a
1060
# brand new K10D, and 209 for one of the first 20 images from a new K10D,
1061
# so either there are ~200 test images shot in the factory, or there is an
1062
# offset of ~200 which is applied to this value before encryption
1063
Name => 'ShutterCount',
1064
Writable => 'undef',
1066
Notes => 'raw value is a big-endian 4-byte integer, encrypted using Date and Time',
1067
RawConv => 'length($val) == 4 ? unpack("N",$val) : undef',
1069
my $val = Image::ExifTool::Pentax::CryptShutterCount($val,$self);
1070
return pack('N', $val);
1072
ValueConv => \&CryptShutterCount,
1073
ValueConvInv => '$val',
1030
1076
Name => 'BlackPoint',
1031
1077
Writable => 'int16u',
1060
Flags => ['Unknown','Binary'],
1105
Name => 'AEMeteringSegments',
1109
measurements from each of the 16 AE metering segments, converted to LV
1111
# metering segment locations (ref 19):
1112
# +-------------------------+
1114
# | +---+---+---+---+ |
1115
# | | 5 | 3/1\ 2| 4 | |
1116
# | +-+-+-+-+ - +-+-+-+-+ |
1117
# +--+ 9 | 7 ||0|| 6 | 8 +--+
1118
# | +-+-+-+-+ - +-+-+-+-+ |
1119
# | |13 |11\ /10|12 | |
1120
# | +---+---+---+---+ |
1122
# +-------------------------+
1123
# convert to approximate LV equivalent (PH):
1126
foreach (split ' ', $val) { push @a, $_ / 8 - 6; }
1127
return join(' ', @a);
1131
foreach (split ' ', $val) { push @a, int(($_ + 6) * 8 + 0.5); }
1132
return join(' ', @a);
1136
foreach (split ' ', $val) { push @a, sprintf('%.1f', $_); }
1137
return join(' ', @a);
1139
PrintConvInv => '$val',
1063
1142
Name => 'FlashADump',
1140
1225
TagTable => 'Image::ExifTool::PrintIM::Main',
1144
Name => 'HometownCityCode',
1145
Writable => 'undef',
1149
Name => 'DestinationCityCode',
1150
Writable => 'undef',
1153
0x2000 => { #PH (Optio 330RS)
1154
Name => 'PreviewImageData',
1157
# 0x2011 WhiteBalanceBias (ref 18)
1158
# 0x2012 WhiteBalance (ref 18)
1159
# 0x2022 ObjectDistance in mm (ref 18)
1160
# 0x2034 FlashDistance (ref 18)
1161
# 0x3000 RecordMode (ref 18)
1162
# 0x3001 SelfTimer? (ref 18)
1163
# 0x3002 Quality (ref 18)
1164
# 0x3003 FocusMode (ref 18)
1165
# 0x3006 TimeZone (ref 18)
1166
# 0x3007 BestshotMode (ref 18)
1167
# 0x3014 ISO (ref 18)
1168
# 0x3015 ColorMode 0=off (ref 18)
1169
# 0x3016 Enhancemnt 0=off (ref 18)
1170
# 0x3017 Filter, 0=off (ref 18)
1173
# NOTE: These are from Image::MakerNotes::Pentax.pm, but they don't seem to work - PH
1187
# 6 => 'Red-eye reduction',
1195
# 2 => 'Black & White',
1200
1230
# shake reduction information (ref PH)
1201
1231
%Image::ExifTool::Pentax::SRInfo = (
1202
1232
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1203
1233
WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1204
1234
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1235
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1206
1237
FIRST_ENTRY => 0,
1207
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1208
1238
NOTES => 'Shake reduction information.',
1210
1240
Name => 'SRResult',
1211
Notes => '0=not stabilized?, 1=stabilized?, 64=not ready?',
1241
PrintConv => { #PH/19
1242
0 => 'Not stabilized',
1214
1250
Name => 'ShakeReduction',
1215
1251
PrintConv => { 0 => 'Off', 1 => 'On' },
1217
2 => 'SR_SWSToSWRTime',
1254
Name => 'SR_SWSToSWRTime',
1255
# SWS=photometering switch, SWR=shutter release switch
1256
# (from http://www.patentstorm.us/patents/6597867-description.html)
1258
time from when the shutter button was half pressed to when the shutter was
1220
1264
# auto-exposure information (ref PH)
1222
1266
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1223
1267
WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1224
1268
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1269
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1226
1271
FIRST_ENTRY => 0,
1227
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1229
1273
Name => 'AEExposureTime',
1230
1274
Notes => 'val = 24 * 2**((32-raw)/8)',
1249
1294
PrintConv => 'int($val + 0.5)',
1250
1295
PrintConvInv => '$val',
1299
Notes => 'val = (raw-64)/8',
1300
ValueConv => '($val-64)/8',
1301
ValueConvInv => '$val * 8 + 64',
1306
Notes => 'val = raw / 8',
1307
ValueConv => '$val/8',
1308
ValueConvInv => '$val * 8',
1311
Name => 'AEFlashTv',
1312
Notes => 'val = 24 * 2**((32-raw)/8)',
1313
ValueConv => '24*exp(-($val-32)*log(2)/8)', #19
1314
ValueConvInv => '-log($val/24)*8/log(2)+32',
1315
PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
1316
PrintConvInv => 'eval $val',
1256
1319
Name => 'AEProgramMode',
1287
1350
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1288
1351
WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1289
1352
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1353
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1291
1355
FIRST_ENTRY => 0,
1292
1356
# (must decode focus distance!)
1293
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1295
1358
Name => 'LensType',
1296
1359
Format => 'int8u[4]',
1390
1462
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1391
1463
WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1392
1464
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1465
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1394
1467
FIRST_ENTRY => 0,
1395
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1397
1469
Name => 'BatteryType',
1398
ValueConv => '$val - 128',
1399
ValueConvInv => '$val + 128',
1470
ValueConv => '$val & 0x7f',
1471
ValueConvInv => '$val | 0x80', # (not sure what this bit means)
1402
1474
Name => 'BatteryBodyGripStates',
1403
1475
Notes => 'body and grip battery state',
1404
ValueConv => '($val >> 8) . " " . ($val & 0x0f)',
1405
ValueConvInv => 'my @a=split(" ",$val); ($a[0] << 8) + $a[1]',
1476
ValueConv => '($val >> 4) . " " . ($val & 0x0f)',
1477
ValueConvInv => 'my @a=split(" ",$val); ($a[0] << 4) + $a[1]',
1479
# internal and grip battery voltage Analogue to Digital measurements,
1480
# open circuit and under load
1407
1481
2 => 'BatteryADBodyNoLoad',
1408
1482
3 => 'BatteryADBodyLoad',
1409
1483
4 => 'BatteryADGripNoLoad',
1410
1484
5 => 'BatteryADGripLoad',
1487
# auto focus information (ref 19)
1488
%Image::ExifTool::Pentax::AFInfo = (
1489
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1490
WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1491
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1492
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1496
Name => 'AFPointsInFocus',
1498
may report two points in focus even though a single AFPoint has been
1499
selected, in which case the selected AFPoint is the first reported
1503
1 => 'Lower-left, Bottom',
1505
3 => 'Lower-right, Bottom',
1506
4 => 'Mid-left, Center',
1507
5 => 'Center (horizontal)', #PH (K10D)
1508
6 => 'Mid-right, Center',
1509
7 => 'Upper-left, Top',
1511
9 => 'Upper-right, Top',
1513
11 => 'Lower-left, Mid-left',
1514
12 => 'Upper-left, Mid-left',
1515
13 => 'Bottom, Center',
1516
14 => 'Top, Center',
1517
15 => 'Lower-right, Mid-right',
1518
16 => 'Upper-right, Mid-right',
1521
19 => 'Center (vertical)', #PH (K10D)
1413
1527
# tags in Pentax QuickTime videos (PH - tests with Optio WP)
1414
1528
# (note: very similar to information in Nikon videos)
1415
1529
%Image::ExifTool::Pentax::MOV = (
1580
# Pentax type 2 (Casio-like) maker notes (ref 1)
1581
%Image::ExifTool::Pentax::Type2 = (
1582
WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
1583
CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
1584
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1585
WRITABLE => 'int16u',
1587
These tags are used by the Pentax Optio 330 and 430, and are similar to the
1591
Name => 'RecordingMode',
1607
Name => 'FocusMode',
1614
Name => 'FlashMode',
1619
6 => 'Red-eye reduction',
1622
# Casio 0x0005 is FlashIntensity
1623
# Casio 0x0006 is ObjectDistance
1625
Name => 'WhiteBalance',
1636
Name => 'DigitalZoom',
1637
Writable => 'int32u',
1640
Name => 'Sharpness',
1656
Name => 'Saturation',
1679
Name => 'ColorFilter',
1682
2 => 'Black & White',
1686
# Casio 0x0018 is AFPoint
1687
# Casio 0x0019 is FlashIntensity
1690
Description => 'Print Image Matching',
1693
TagTable => 'Image::ExifTool::PrintIM::Main',
1697
Name => 'HometownCityCode',
1698
Writable => 'undef',
1702
Name => 'DestinationCityCode',
1703
Writable => 'undef',
1708
# ASCII-based maker notes of Optio E20 - PH
1709
%Image::ExifTool::Pentax::Type4 = (
1710
PROCESS_PROC => \&Image::ExifTool::HP::ProcessHP,
1711
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1713
The following few tags are extracted from the wealth of information
1714
available in maker notes of the Optio E20. These maker notes are stored as
1715
ASCII text in a format very similar to some HP models.
1717
'F/W Version' => 'FirmwareVersion',
1720
#------------------------------------------------------------------------------
1721
# Encrypt or decrypt Pentax ShutterCount (symmetrical encryption) - PH
1722
# Inputs: 0) shutter count value, 1) ExifTool object ref
1723
# Returns: Encrypted or decrypted ShutterCount
1724
sub CryptShutterCount($$)
1726
my ($val, $exifTool) = @_;
1727
# Pentax Date and Time values are used in the encryption
1728
return undef unless $$exifTool{PentaxDate} and $$exifTool{PentaxTime} and
1729
length($$exifTool{PentaxDate})==4 and length($$exifTool{PentaxTime})>=3;
1730
# get Date and Time as integers (after padding Time with a null byte)
1731
my $date = unpack('N', $$exifTool{PentaxDate});
1732
my $time = unpack('N', $$exifTool{PentaxTime} . "\0");
1733
return $val ^ $date ^ (0xffffffff - $time);
1513
1783
=item L<http://www.cybercom.net/~dcoffin/dcraw/>
1515
=item (...plus lots of testing with my Optio WP!)
1785
=item (...plus lots of testing with my Optio WP and K10D!)
1519
1789
=head1 ACKNOWLEDGEMENTS
1521
Thanks to Wayne Smith, John Francis, Douglas O'Brien and Cvetan Ivanov for
1522
help figuring out some Pentax tags, and to Denis Bourez, Kazumichi Kawabata,
1523
David Buret and Barney Garrett for adding to the LensType list, and to Ger
1524
Vermeulen for contributing print conversion values for some tags.
1791
Thanks to Wayne Smith, John Francis, Douglas O'Brien Cvetan Ivanov and Jens
1792
Duttke for help figuring out some Pentax tags, Denis Bourez, Kazumichi
1793
Kawabata, David Buret, Barney Garrett and Axel Kellner for adding to the
1794
LensType list, and Ger Vermeulen for contributing print conversion values