source: gsdl/trunk/perllib/cpan/Image/ExifTool/Minolta.pm@ 16842

Last change on this file since 16842 was 16842, checked in by davidb, 16 years ago

ExifTool added to cpan area to support metadata extraction from files such as JPEG. Primarily targetted as Image files (hence the Image folder name decided upon by the ExifTool author) it also can handle video such as flash and audio such as Wav

File size: 41.4 KB
Line 
1#------------------------------------------------------------------------------
2# File: Minolta.pm
3#
4# Description: Minolta EXIF maker notes tags
5#
6# Revisions: 04/06/2004 - P. Harvey Created
7# 09/09/2005 - P. Harvey Added ability to write MRW files
8#
9# References: 1) http://www.dalibor.cz/minolta/makernote.htm
10# 2) Jay Al-Saadi private communication (testing with A2)
11# 3) Shingo Noguchi, PhotoXP (http://www.daifukuya.com/photoxp/)
12# 4) Niels Kristian Bech Jensen private communication
13# 5) http://www.cybercom.net/~dcoffin/dcraw/
14# 6) Pedro Corte-Real private communication
15# 7) ExifTool forum post by bronek (http://www.cpanforum.com/posts/1118)
16# 8) http://www.chauveau-central.net/mrw-format/
17# 9) CPAN Forum post by 'geve' (http://www.cpanforum.com/threads/2168)
18# 10) http://homepage3.nifty.com/kamisaka/makernote/makernote_km.htm
19# 11) http://www.dyxum.com/dforum/forum_posts.asp?TID=6371&PN=1 and
20# http://www.dyxum.com/dAdmin/lenses/MakerNoteList_Public.asp?stro=makr
21# 12) http://www.minolta-forum.de/forum/index.php?showtopic=14914
22# 13) http://www.mhohner.de/minolta/lenses.php
23# 14) Jeffery Small private communication (tests with 7D)
24# 15) http://homepage3.nifty.com/kamisaka/makernote/makernote_sony.htm
25#------------------------------------------------------------------------------
26
27package Image::ExifTool::Minolta;
28
29use strict;
30use vars qw($VERSION %minoltaLensIDs %minoltaColorMode);
31use Image::ExifTool qw(:DataAccess :Utils);
32use Image::ExifTool::Exif;
33
34$VERSION = '1.33';
35
36# lens ID numbers (ref 3)
37%minoltaLensIDs = (
38 0 => 'Minolta AF 28-85mm F3.5-4.5',
39 1 => 'Minolta AF 80-200mm F2.8 HS-APO G',
40 2 => 'Minolta AF 28-70mm F2.8 G',
41 3 => 'Minolta AF 28-80mm F4-5.6',
42 5 => 'Minolta AF 35-70mm F3.5-4.5',
43 6 => 'Minolta AF 24-85mm F3.5-4.5 [New]',
44 # 7 => 'AF 100-400mm F4.5-6.7 (D)', ??
45 7 => 'Minolta AF 100-300mm F4.5-5.6 APO [New]',
46 8 => 'Minolta AF 70-210mm F4.5-5.6',
47 9 => 'Minolta AF 50mm F3.5 Macro',
48 10 => 'Minolta AF 28-105mm F3.5-4.5 [New]',
49 11 => 'Minolta AF 300mm F4 HS-APO G',
50 12 => 'Minolta AF 100mm F2.8 Soft Focus',
51 13 => 'Minolta AF 75-300mm F4.5-5.6',
52 14 => 'Minolta AF 100-400mm F4.5-6.7 APO',
53 15 => 'Minolta AF 400mm F4.5 HS-APO G',
54 16 => 'Minolta AF 17-35mm F3.5 G',
55 17 => 'Minolta AF 20-35mm F3.5-4.5',
56 18 => 'Minolta AF 28-80mm F3.5-5.6 II',
57 19 => 'Minolta AF 35mm F1.4',
58 20 => 'Minolta STF 135mm F2.8 [T4.5]',
59 22 => 'Minolta AF 35-80mm F4-5.6',
60 23 => 'Minolta AF 200mm F4 G APO Macro',
61 24 => 'Minolta AF 24-105mm F3.5-4.5 (D)', # or Sigma 18-50mm F2.8 or Sigma 17-70mm F2.8-4.5 (D)',
62 25 => 'Minolta AF 100-300mm F4.5-5.6 (D)',
63 27 => 'Minolta AF 85mm F1.4 G',
64 28 => 'Minolta AF 100mm F2.8 Macro (D)',
65 29 => 'Minolta AF 75-300mm F4.5-5.6 (D)',
66 30 => 'Minolta AF 28-80mm F3.5-5.6 (D)', # or Sigma AF 12-24mm F4.5-5.6 EX DG',
67 31 => 'Minolta AF 50mm F2.8 Macro (D) or AF 50mm F3.5 Macro',
68 # 32 => 'AF 100-400mm F4.5-6.7 (D) x1.5', ??
69 32 => 'Minolta AF 300mm F2.8 G',
70 33 => 'Minolta AF 70-200mm F2.8 G (D) SSM',
71 35 => 'Minolta AF 85mm F1.4 G (D) Limited',
72 36 => 'Minolta AF 28-100mm F3.5-5.6 (D)',
73 38 => 'KonicaMinolta AF 17-35mm F2.8-4 (D)',
74 39 => 'Minolta AF 28-75mm F2.8 (D)',
75 40 => 'KonicaMinolta or Sony AF DT 18-70mm F3.5-5.6 (D)',
76 41 => 'Minolta AF DT 11-18mm F4.5-5.6 (D)',
77 42 => 'Minolta AF DT 18-200mm F3.5-6.3 (D)',
78 43 => 'Minolta AF 35mm F1.4 G',
79 44 => 'Minolta AF 50mm F1.4',
80 45 => 'Carl Zeiss Planar T* 85mm F1.4 ZA',
81 46 => 'Carl Zeiss Vario-Sonnar T* DT 16-80mm F3.5-4.5 ZA',
82 47 => 'Carl Zeiss Sonnar T* 135mm F1.8 ZA',
83 128 => 'Tamron 18-200, 28-300 or 80-300mm F3.5-6.3',
84 129 => 'Tamron 200-400mm F5.6 LD', #12
85 138 => 'Soligor 19-35mm F3.5-4.5', #11
86 25501 => 'Minolta AF 50mm F1.7', #7
87 25511 => 'Minolta AF 35-70mm F4', # or Sigma UC AF 28-70mm F3.5-4.5 or Sigma M-AF 70-200mm F2.8 EX Aspherical', #/12/12
88 25521 => 'Minolta AF 28-85mm F3.5-4.5 [New]', # or Tokina 19-35mm F3.5-4.5 or Tokina 28-70mm F2.8 AT-X', #3/7
89 25531 => 'Minolta AF 28-135mm F4-4.5',
90 25541 => 'Minolta AF 35-105mm F3.5-4.5', #13
91 25551 => 'Minolta AF 70-210mm F4 Macro', # or Sigma 70-210mm F4-5.6 APO or Sigma M-AF 70-200mm F2.8 EX APO', #7/6
92 25561 => 'Minolta AF 135mm F2.8',
93 25571 => 'Minolta AF 28mm F2.8',
94 25581 => 'Minolta AF 24-50mm F4',
95 25601 => 'Minolta AF 100-200mm F4.5',
96 25611 => 'Minolta AF 75-300mm F4.5-5.6', #13 # or Sigma 70-300mm F4-5.6 or Sigma 300mm F4 APO Macro', #12/3/7
97 25621 => 'Minolta AF 50mm F1.4 [New]', #13
98 25631 => 'Minolta AF 300mm F2.8 G',
99 25641 => 'Minolta AF 50mm F2.8 Macro',
100 25651 => 'Minolta AF 600mm F4',
101 25661 => 'Minolta AF 24mm F2.8',
102 25721 => 'Minolta AF 500mm F8 Reflex',
103 25781 => 'Minolta AF 16mm F2.8 Fisheye', # or Sigma 8mm F4 Fisheye or Sigma 14mm F3.5',
104 25791 => 'Minolta AF 20mm F2.8',
105 25811 => 'Minolta AF 100mm F2.8 Macro New', # or Tamron 90mm F2.8 Macro or Sigma 180mm F5.6 Macro',
106 25858 => 'Minolta AF 35-105mm F3.5-4.5 New', # or Tamron 24-135mm F3.5-5.6',
107 25881 => 'Minolta AF 70-210mm F3.5-4.5',
108 25891 => 'Minolta AF 80-200 F2.8 APO', # or Tokina 80-200mm F2.8',
109 25911 => 'Minolta AF 35mm F1.4', #(from Sony list)
110 25921 => 'Minolta AF 85mm F1.4 G (D)',
111 25931 => 'Minolta AF 200mm F2.8 G APO',
112 25941 => 'Minolta AF 3X-1X F1.7-2.8 Macro',
113 25961 => 'Minolta AF 28mm F2',
114 25971 => 'Minolta AF 35mm F2',
115 25981 => 'Minolta AF 100mm F2',
116 26041 => 'Minolta AF 80-200mm F4.5-5.6',
117 26051 => 'Minolta AF 35-80mm F4-5.6', #(from Sony list)
118 26061 => 'Minolta AF 100-300mm F4.5-5.6 (D)',
119 26071 => 'Minolta AF 35-80mm F4-5.6', #13
120 26081 => 'Minolta AF 300mm F2.8 G',
121 26091 => 'Minolta AF 600mm F4 HS-APO G',
122 26121 => 'Minolta AF 200mm F2.8 G HS-APO',
123 26131 => 'Minolta AF 50mm F1.7 New',
124 26151 => 'Minolta AF 28-105mm F3.5-4.5 Power Zoom',
125 26161 => 'Minolta AF 35-200mm F4.5-5.6 Power Zoom',
126 26181 => 'Minolta AF 28-80mm F4-5.6 Power Zoom',
127 26191 => 'Minolta AF 80-200mm F4.5-5.6 Power Zoom',
128 26201 => 'Minolta AF 28-70mm F2.8 G', #11
129 26211 => 'Minolta AF 100-300mm F4.5-5.6 Power Zoom',
130 26241 => 'Minolta AF 35-80mm F4-5.6 Power Zoom',
131 26281 => 'Minolta AF 80-200mm F2.8 G', #11
132 26291 => 'Minolta AF 85mm F1.4 New',
133 26311 => 'Minolta AF 100-300mm F4.5-5.6 APO', #11
134 26321 => 'Minolta AF 24-50mm F4 New',
135 26381 => 'Minolta AF 50mm F2.8 Macro New',
136 26391 => 'Minolta AF 100mm F2.8 Macro',
137 26411 => 'Minolta AF 20mm F2.8 New',
138 26421 => 'Minolta AF 24mm F2.8 New',
139 26441 => 'Minolta AF 100-400mm F4.5-6.7 APO', #11
140 26621 => 'Minolta AF 50mm F1.4 New',
141 26671 => 'Minolta AF 35mm F2 New',
142 26681 => 'Minolta AF 28mm F2 New',
143 26721 => 'Minolta AF 24-105mm F3.5-4.5 (D)', #11
144 45741 => 'Minolta AF 200mm F2.8 G x2', # or Tokina 300mm F2.8 x2',
145);
146
147%minoltaColorMode = (
148 0 => 'Natural color',
149 1 => 'Black & White',
150 2 => 'Vivid color',
151 3 => 'Solarization',
152 4 => 'Adobe RGB',
153 5 => 'Sepia', #10
154 9 => 'Natural', #10
155 12 => 'Portrait', #10
156 13 => 'Natural sRGB',
157 14 => 'Natural+ sRGB',
158 15 => 'Landscape', #10
159 16 => 'Evening', #10
160 17 => 'Night Scene', #10
161 18 => 'Night Portrait', #10
162);
163
164# Minolta tag table
165%Image::ExifTool::Minolta::Main = (
166 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
167 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
168 WRITABLE => 1,
169 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
170 0x0000 => {
171 Name => 'MakerNoteVersion',
172 Writable => 'undef',
173 Count => 4,
174 },
175 0x0001 => {
176 Name => 'MinoltaCameraSettingsOld',
177 SubDirectory => {
178 TagTable => 'Image::ExifTool::Minolta::CameraSettings',
179 ByteOrder => 'BigEndian',
180 },
181 },
182 0x0003 => {
183 Name => 'MinoltaCameraSettings',
184 # These camera settings are different for the DiMAGE X31
185 Condition => '$self->{CameraModel} ne "DiMAGE X31"',
186 SubDirectory => {
187 TagTable => 'Image::ExifTool::Minolta::CameraSettings',
188 ByteOrder => 'BigEndian',
189 },
190 },
191 0x0004 => { #8
192 Name => 'MinoltaCameraSettings7D',
193 SubDirectory => {
194 TagTable => 'Image::ExifTool::Minolta::CameraSettings7D',
195 ByteOrder => 'BigEndian',
196 },
197 },
198 # it appears that image stabilization is on if this tag exists (ref 2),
199 # but it is an 8kB binary data block!
200 0x0018 => {
201 Name => 'ImageStabilization',
202 Condition => '$self->{CameraModel} =~ /^DiMAGE (A1|A2|X1)$/',
203 Notes => q{
204 a block of binary data which exists in DiMAGE A2 (and A1/X1?) images only if
205 image stabilization is enabled
206 },
207 ValueConv => '"On"',
208 },
209 0x0040 => {
210 Name => 'CompressedImageSize',
211 Writable => 'int32u',
212 },
213 0x0081 => {
214 # JPEG preview found in DiMAGE 7 images
215 %Image::ExifTool::previewImageTagInfo,
216 Permanent => 1, # don't add this to a file
217 },
218 0x0088 => {
219 Name => 'PreviewImageStart',
220 Flags => 'IsOffset',
221 OffsetPair => 0x0089, # point to associated byte count
222 DataTag => 'PreviewImage',
223 Writable => 'int32u',
224 Protected => 2,
225 },
226 0x0089 => {
227 Name => 'PreviewImageLength',
228 OffsetPair => 0x0088, # point to associated offset
229 DataTag => 'PreviewImage',
230 Writable => 'int32u',
231 Protected => 2,
232 },
233 0x0100 => { #10 (needs verification - PH)
234 Name => 'SceneMode',
235 PrintConv => {
236 0 => 'Standard',
237 1 => 'Portrait',
238 2 => 'Text',
239 3 => 'Night Scene',
240 4 => 'Evening Scene',
241 5 => 'Sports',
242 6 => 'Landscape',
243 9 => 'Super Macro',
244 },
245 },
246 0x0101 => [
247 {
248 Name => 'ColorMode',
249 Condition => '$self->{CameraMake} !~ /^SONY/',
250 Priority => 0, # Other ColorMode is more reliable for A2
251 Writable => 'int32u',
252 PrintConv => \%minoltaColorMode,
253 },
254 { #15
255 Name => 'ColorMode',
256 Writable => 'int32u',
257 Notes => 'Sony DSLR-A100',
258 PrintConv => {
259 0 => 'Standard',
260 1 => 'Vivid', #PH
261 2 => 'Portrait',
262 3 => 'Landscape',
263 4 => 'Sunset',
264 5 => 'Night Scene',
265 6 => 'B&W',
266 7 => 'Adobe RGB',
267 },
268 },
269 ],
270 0x0102 => {
271 Name => 'MinoltaQuality',
272 Writable => 'int32u',
273 # PrintConv strings conform with Minolta reference manual (ref 4)
274 # (note that Minolta calls an uncompressed TIFF image "Super fine")
275 PrintConv => {
276 0 => 'Raw',
277 1 => 'Super Fine',
278 2 => 'Fine',
279 3 => 'Standard',
280 4 => 'Economy',
281 5 => 'Extra fine',
282 },
283 },
284 # (0x0103 is the same as 0x0102 above) -- this is true for some
285 # cameras (A2/7Hi), but not others - PH
286 0x0103 => [
287 {
288 Name => 'MinoltaQuality',
289 Writable => 'int32u',
290 Condition => '$self->{CameraModel} =~ /^DiMAGE (A2|7Hi)$/',
291 Notes => 'quality for DiMAGE A2/7Hi',
292 Priority => 0, # lower priority because this doesn't work for A200
293 PrintConv => { #4
294 0 => 'Raw',
295 1 => 'Super Fine',
296 2 => 'Fine',
297 3 => 'Standard',
298 4 => 'Economy',
299 5 => 'Extra fine',
300 },
301 },
302 { #PH
303 Name => 'MinoltaImageSize',
304 Writable => 'int32u',
305 Condition => '$self->{CameraModel} !~ /^DiMAGE A200$/',
306 Notes => 'image size for other models except A200',
307 PrintConv => {
308 1 => '1600x1200',
309 2 => '1280x960',
310 3 => '640x480',
311 5 => '2560x1920',
312 6 => '2272x1704',
313 7 => '2048x1536',
314 },
315 },
316 ],
317 0x0104 => { #14
318 Name => 'FlashExposureComp',
319 Description => 'Flash Exposure Compensation',
320 Writable => 'rational64s',
321 },
322# needs verification:
323# 0x0105 => { #10
324# Name => 'Teleconverter',
325# PrintConv => {
326# 0 => 'None',
327# 72 => 'Minolta AF 2x APO (D)',
328# 80 => 'Minolta AF 2x APO II',
329# 136 => 'Minolta AF 1.4x APO (D)',
330# 144 => 'Minolta AF 1.4x APO II',
331# },
332# },
333 0x0107 => { #8
334 Name => 'ImageStabilization',
335 Writable => 'int32u',
336 PrintConv => {
337 1 => 'Off',
338 5 => 'On',
339 },
340 },
341 0x010a => {
342 Name => 'ZoneMatching',
343 Writable => 'int32u',
344 PrintConv => {
345 0 => 'ISO Setting Used',
346 1 => 'High Key',
347 2 => 'Low Key',
348 },
349 },
350 0x010b => {
351 Name => 'ColorTemperature',
352 Writable => 'int32u',
353 },
354 0x010c => { #3 (Alpha 7)
355 Name => 'LensID',
356 Writable => 'int32u',
357 PrintConv => \%minoltaLensIDs,
358 },
359 # 0x010e - WhiteBalance according to ref #10
360 0x0113 => { #PH
361 Name => 'ImageStabilization',
362 Condition => '$self->{CameraModel} eq "DSLR-A100"',
363 Notes => 'valid for Sony A100 only',
364 Writable => 'int32u',
365 PrintConv => { 0 => 'Off', 1 => 'On' },
366 },
367 0x0114 => [
368 { #8
369 Name => 'MinoltaCameraSettings5D',
370 Condition => '$self->{CameraModel} =~ /^(DYNAX 5D|MAXXUM 5D|ALPHA SWEET)/',
371 SubDirectory => {
372 TagTable => 'Image::ExifTool::Minolta::CameraSettings5D',
373 ByteOrder => 'BigEndian',
374 },
375 },
376 { #PH
377 Name => 'MinoltaCameraSettingsA100',
378 Condition => '$self->{CameraModel} eq "DSLR-A100"',
379 SubDirectory => {
380 TagTable => 'Image::ExifTool::Minolta::CameraSettingsA100',
381 ByteOrder => 'BigEndian', # required because order differs for ARW and JPG images
382 },
383 },
384 ],
385 0x0e00 => {
386 Name => 'PrintIM',
387 Description => 'Print Image Matching',
388 Writable => 0,
389 SubDirectory => {
390 TagTable => 'Image::ExifTool::PrintIM::Main',
391 },
392 },
393 0x0f00 => {
394 Name => 'MinoltaCameraSettings2',
395 Writable => 0,
396 },
397);
398
399%Image::ExifTool::Minolta::CameraSettings = (
400 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
401 WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
402 CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
403 WRITABLE => 1,
404 PRIORITY => 0, # not as reliable as other tags
405 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
406 FORMAT => 'int32u',
407 FIRST_ENTRY => 0,
408 NOTES => q{
409 There is some variability in CameraSettings information between different
410 models (and sometimes even between different firmware versions), so this
411 information may not be as reliable as it should be. Because of this, tags
412 in the following tables are set to lower priority to prevent them from
413 superceeding the values of same-named tags in other locations when duplicate
414 tags are disabled.
415 },
416 1 => {
417 Name => 'ExposureMode',
418 PrintConv => {
419 0 => 'Program',
420 1 => 'Aperture Priority',
421 2 => 'Shutter Priority',
422 3 => 'Manual',
423 },
424 },
425 2 => {
426 Name => 'FlashMode',
427 PrintConv => {
428 0 => 'Fill flash',
429 1 => 'Red-eye reduction',
430 2 => 'Rear flash sync',
431 3 => 'Wireless',
432 },
433 },
434 3 => {
435 Name => 'WhiteBalance',
436 PrintConv => 'Image::ExifTool::Minolta::ConvertWhiteBalance($val)',
437 },
438 4 => {
439 Name => 'MinoltaImageSize',
440 PrintConv => {
441 0 => 'Full',
442 1 => '1600x1200',
443 2 => '1280x960',
444 3 => '640x480',
445 6 => '2080x1560', #PH (A2)
446 7 => '2560x1920', #PH (A2)
447 8 => '3264x2176', #PH (A2)
448 },
449 },
450 5 => {
451 Name => 'MinoltaQuality',
452 PrintConv => { #4
453 0 => 'Raw',
454 1 => 'Super Fine',
455 2 => 'Fine',
456 3 => 'Standard',
457 4 => 'Economy',
458 5 => 'Extra Fine',
459 },
460 },
461 6 => {
462 Name => 'DriveMode',
463 PrintConv => {
464 0 => 'Single',
465 1 => 'Continuous',
466 2 => 'Self-timer',
467 4 => 'Bracketing',
468 5 => 'Interval',
469 6 => 'UHS continuous',
470 7 => 'HS continuous',
471 },
472 },
473 7 => {
474 Name => 'MeteringMode',
475 PrintConv => {
476 0 => 'Multi-segment',
477 1 => 'Center weighted',
478 2 => 'Spot',
479 },
480 },
481 8 => {
482 Name => 'ISO',
483 ValueConv => '2 ** (($val-48)/8) * 100',
484 ValueConvInv => '48 + 8*log($val/100)/log(2)',
485 PrintConv => 'int($val + 0.5)',
486 PrintConvInv => '$val',
487 },
488 9 => {
489 Name => 'ExposureTime',
490 ValueConv => '2 ** ((48-$val)/8)',
491 ValueConvInv => '48 - 8*log($val)/log(2)',
492 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
493 PrintConvInv => 'eval $val',
494 },
495 10 => {
496 Name => 'FNumber',
497 ValueConv => '2 ** (($val-8)/16)',
498 ValueConvInv => '8 + 16*log($val)/log(2)',
499 PrintConv => 'sprintf("%.1f",$val)',
500 PrintConvInv => '$val',
501 },
502 11 => {
503 Name => 'MacroMode',
504 PrintConv => {
505 0 => 'Off',
506 1 => 'On',
507 },
508 },
509 12 => {
510 Name => 'DigitalZoom',
511 PrintConv => {
512 0 => 'Off',
513 1 => 'Electronic magnification',
514 2 => '2x',
515 },
516 },
517 13 => {
518 Name => 'ExposureCompensation',
519 ValueConv => '$val/3 - 2',
520 ValueConvInv => '($val + 2) * 3',
521 PrintConv => 'Image::ExifTool::Exif::ConvertFraction($val)',
522 PrintConvInv => 'eval $val',
523 },
524 14 => {
525 Name => 'BracketStep',
526 PrintConv => {
527 0 => '1/3 EV',
528 1 => '2/3 EV',
529 2 => '1 EV',
530 },
531 },
532 16 => 'IntervalLength',
533 17 => 'IntervalNumber',
534 18 => {
535 Name => 'FocalLength',
536 ValueConv => '$val / 256',
537 ValueConvInv => '$val * 256',
538 PrintConv => 'sprintf("%.1fmm",$val)',
539 PrintConvInv => '$val=~s/mm$//;$val',
540 },
541 19 => {
542 Name => 'FocusDistance',
543 ValueConv => '$val / 1000',
544 ValueConvInv => '$val * 1000',
545 PrintConv => '$val ? "$val m" : "inf"',
546 PrintConvInv => '$val eq "inf" ? 0 : $val =~ s/\s*m$//, $val',
547 },
548 20 => {
549 Name => 'FlashFired',
550 PrintConv => {
551 0 => 'No',
552 1 => 'Yes',
553 },
554 },
555 21 => {
556 Name => 'MinoltaDate',
557 Groups => { 2 => 'Time' },
558 Shift => 'Time',
559 ValueConv => 'sprintf("%4d:%.2d:%.2d",$val>>16,($val&0xff00)>>8,$val&0xff)',
560 ValueConvInv => 'my @a=($val=~/(\d+):(\d+):(\d+)/); @a ? ($a[0]<<16)+($a[1]<<8)+$a[2] : undef',
561 },
562 22 => {
563 Name => 'MinoltaTime',
564 Groups => { 2 => 'Time' },
565 Shift => 'Time',
566 ValueConv => 'sprintf("%.2d:%.2d:%.2d",$val>>16,($val&0xff00)>>8,$val&0xff)',
567 ValueConvInv => 'my @a=($val=~/(\d+):(\d+):(\d+)/); @a ? ($a[0]<<16)+($a[1]<<8)+$a[2] : undef',
568 },
569 23 => {
570 Name => 'MaxAperture',
571 ValueConv => '2 ** (($val-8)/16)',
572 ValueConvInv => '8 + 16*log($val)/log(2)',
573 PrintConv => 'sprintf("%.1f",$val)',
574 PrintConvInv => '$val',
575 },
576 26 => {
577 Name => 'FileNumberMemory',
578 PrintConv => {
579 0 => 'Off',
580 1 => 'On',
581 },
582 },
583 27 => 'LastFileNumber',
584 28 => {
585 Name => 'ColorBalanceRed',
586 ValueConv => '$val / 256',
587 ValueConvInv => '$val * 256',
588 },
589 29 => {
590 Name => 'ColorBalanceGreen',
591 ValueConv => '$val / 256',
592 ValueConvInv => '$val * 256',
593 },
594 30 => {
595 Name => 'ColorBalanceBlue',
596 ValueConv => '$val / 256',
597 ValueConvInv => '$val * 256',
598 },
599 31 => {
600 Name => 'Saturation',
601 ValueConv => '$val - ($self->{CameraModel}=~/DiMAGE A2/ ? 5 : 3)',
602 ValueConvInv => '$val + ($self->{CameraModel}=~/DiMAGE A2/ ? 5 : 3)',
603 PrintConv => 'Image::ExifTool::Exif::PrintParameter($val)',
604 PrintConvInv => '$val=~/normal/i ? 0 : $val',
605 },
606 32 => {
607 Name => 'Contrast',
608 ValueConv => '$val - ($self->{CameraModel}=~/DiMAGE A2/ ? 5 : 3)',
609 ValueConvInv => '$val + ($self->{CameraModel}=~/DiMAGE A2/ ? 5 : 3)',
610 PrintConv => 'Image::ExifTool::Exif::PrintParameter($val)',
611 PrintConvInv => '$val=~/normal/i ? 0 : $val',
612 },
613 33 => {
614 Name => 'Sharpness',
615 PrintConv => {
616 0 => 'Hard',
617 1 => 'Normal',
618 2 => 'Soft',
619 },
620 },
621 34 => {
622 Name => 'SubjectProgram',
623 PrintConv => {
624 0 => 'None',
625 1 => 'Portrait',
626 2 => 'Text',
627 3 => 'Night portrait',
628 4 => 'Sunset',
629 5 => 'Sports action',
630 },
631 },
632 35 => {
633 Name => 'FlashExposureComp',
634 Description => 'Flash Exposure Compensation',
635 ValueConv => '($val - 6) / 3',
636 ValueConvInv => '$val * 3 + 6',
637 PrintConv => 'Image::ExifTool::Exif::ConvertFraction($val)',
638 PrintConvInv => 'eval $val',
639 },
640 36 => {
641 Name => 'ISOSetting',
642 PrintConv => {
643 0 => 100,
644 1 => 200,
645 2 => 400,
646 3 => 800,
647 4 => 'Auto',
648 5 => 64,
649 },
650 },
651 37 => {
652 Name => 'MinoltaModelID',
653 PrintConv => {
654 0 => 'DiMAGE 7, X1, X21 or X31',
655 1 => 'DiMAGE 5',
656 2 => 'DiMAGE S304',
657 3 => 'DiMAGE S404',
658 4 => 'DiMAGE 7i',
659 5 => 'DiMAGE 7Hi',
660 6 => 'DiMAGE A1',
661 7 => 'DiMAGE A2 or S414',
662 },
663 },
664 38 => {
665 Name => 'IntervalMode',
666 PrintConv => {
667 0 => 'Still Image',
668 1 => 'Time-lapse Movie',
669 },
670 },
671 39 => {
672 Name => 'FolderName',
673 PrintConv => {
674 0 => 'Standard Form',
675 1 => 'Data Form',
676 },
677 },
678 40 => {
679 Name => 'ColorMode',
680 PrintConv => {
681 0 => 'Natural color',
682 1 => 'Black & White',
683 2 => 'Vivid color',
684 3 => 'Solarization',
685 4 => 'Adobe RGB',
686 },
687 },
688 41 => {
689 Name => 'ColorFilter',
690 ValueConv => '$val - ($self->{CameraModel}=~/DiMAGE A2/ ? 5 : 3)',
691 ValueConvInv => '$val + ($self->{CameraModel}=~/DiMAGE A2/ ? 5 : 3)',
692 },
693 42 => 'BWFilter',
694 43 => {
695 Name => 'InternalFlash',
696 PrintConv => {
697 0 => 'No',
698 1 => 'Fired',
699 },
700 },
701 44 => {
702 Name => 'Brightness',
703 ValueConv => '$val/8 - 6',
704 ValueConvInv => '($val + 6) * 8',
705 },
706 45 => 'SpotFocusPointX',
707 46 => 'SpotFocusPointY',
708 47 => {
709 Name => 'WideFocusZone',
710 PrintConv => {
711 0 => 'No zone',
712 1 => 'Center zone (horizontal orientation)',
713 2 => 'Center zone (vertical orientation)',
714 3 => 'Left zone',
715 4 => 'Right zone',
716 },
717 },
718 48 => {
719 Name => 'FocusMode',
720 PrintConv => {
721 0 => 'AF',
722 1 => 'MF',
723 },
724 },
725 49 => {
726 Name => 'FocusArea',
727 PrintConv => {
728 0 => 'Wide Focus (normal)',
729 1 => 'Spot Focus',
730 },
731 },
732 50 => {
733 Name => 'DECPosition',
734 PrintConv => {
735 0 => 'Exposure',
736 1 => 'Contrast',
737 2 => 'Saturation',
738 3 => 'Filter',
739 },
740 },
741 # 7Hi only:
742 51 => {
743 Name => 'ColorProfile',
744 Condition => '$self->{CameraModel} eq "DiMAGE 7Hi"',
745 Notes => 'DiMAGE 7Hi only',
746 PrintConv => {
747 0 => 'Not Embedded',
748 1 => 'Embedded',
749 },
750 },
751 # (the following may be entry 51 for other models?)
752 52 => {
753 Name => 'DataImprint',
754 Condition => '$self->{CameraModel} eq "DiMAGE 7Hi"',
755 Notes => 'DiMAGE 7Hi only',
756 PrintConv => {
757 0 => 'None',
758 1 => 'YYYY/MM/DD',
759 2 => 'MM/DD/HH:MM',
760 3 => 'Text',
761 4 => 'Text + ID#',
762 },
763 },
764 63 => { #9
765 Name => 'FlashMetering',
766 PrintConv => {
767 0 => 'ADI (Advanced Distance Integration)',
768 1 => 'Pre-flash TTL',
769 2 => 'Manual flash control',
770 },
771 },
772);
773
774# Camera settings used by the 7D (ref 8)
775%Image::ExifTool::Minolta::CameraSettings7D = (
776 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
777 WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
778 CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
779 WRITABLE => 1,
780 PRIORITY => 0,
781 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
782 FORMAT => 'int16u',
783 FIRST_ENTRY => 0,
784 0x00 => {
785 Name => 'ExposureMode',
786 PrintConv => {
787 0 => 'Program',
788 1 => 'Aperture Priority',
789 2 => 'Shutter Priority',
790 3 => 'Manual',
791 4 => 'Auto?',
792 5 => 'Program-shift A',
793 6 => 'Program-shift S',
794 },
795 },
796 0x02 => { #PH
797 Name => 'MinoltaImageSize',
798 PrintConv => {
799 0 => 'Large',
800 1 => 'Medium',
801 2 => 'Small',
802 },
803 },
804 0x03 => {
805 Name => 'MinoltaQuality',
806 PrintConv => {
807 0 => 'RAW',
808 16 => 'Fine', #PH
809 32 => 'Normal', #PH
810 34 => 'RAW+JPEG',
811 48 => 'Economy', #PH
812 },
813 },
814 0x04 => {
815 Name => 'WhiteBalance',
816 PrintConv => {
817 0 => 'Auto',
818 1 => 'Daylight',
819 2 => 'Shade',
820 3 => 'Cloudy',
821 4 => 'Tungsten',
822 5 => 'Fluorescent',
823 0x100 => 'Kelvin',
824 0x200 => 'Manual',
825 },
826 },
827 0x0e => {
828 Name => 'FocusMode',
829 PrintConv => {
830 0 => 'Single-shot AF',
831 1 => 'Continuous AF',
832 3 => 'Automatic AF',
833 4 => 'Manual',
834 },
835 },
836 0x10 => {
837 Name => 'AFPoints',
838 PrintConv => { BITMASK => {
839 0 => 'Center',
840 1 => 'Top',
841 2 => 'Top-Right',
842 3 => 'Right',
843 4 => 'Bottom-Right',
844 5 => 'Bottom',
845 6 => 'Bottom-Left',
846 7 => 'Left',
847 8 => 'Top-Left',
848 } },
849 },
850 0x15 => {
851 Name => 'Flash',
852 PrintConv => { 0 => 'Off', 1 => 'On' },
853 },
854# needs verification:
855# 0x16 => { #10
856# Name => 'FlashMode',
857# PrintConv => {
858# 0 => 'Normal',
859# 1 => 'Red-eye reduction',
860# 2 => 'Rear flash sync',
861# },
862# },
863 0x1c => {
864 Name => 'ISOSetting',
865 PrintConv => {
866 0 => 'Auto', #10
867 1 => 100,
868 3 => 200,
869 4 => 400,
870 5 => 800,
871 6 => 1600,
872 7 => 3200,
873 },
874 },
875 0x1e => {
876 Name => 'ExposureCompensation',
877 Format => 'int16s',
878 ValueConv => '$val / 24',
879 ValueConvInv => '$val * 24',
880 PrintConv => 'Image::ExifTool::Exif::ConvertFraction($val)',
881 PrintConvInv => 'eval $val',
882 },
883 0x25 => {
884 Name => 'ColorSpace',
885 PrintConv => {
886 0 => 'Natural sRGB',
887 1 => 'Natural+ sRGB',
888 4 => 'Adobe RGB',
889 },
890 },
891 0x26 => {
892 Name => 'Sharpness',
893 ValueConv => '$val - 10',
894 ValueConvInv => '$val + 10',
895 },
896 0x27 => {
897 Name => 'Contrast',
898 ValueConv => '$val - 10',
899 ValueConvInv => '$val + 10',
900 },
901 0x28 => {
902 Name => 'Saturation',
903 ValueConv => '$val - 10',
904 ValueConvInv => '$val + 10',
905 },
906 0x2d => 'FreeMemoryCardImages',
907 0x3f => {
908 Format => 'int16s',
909 Name => 'ColorTemperature',
910 ValueConv => '$val * 100',
911 ValueConvInv => '$val / 100',
912 },
913# needs verification:
914# 0x40 => { #10
915# Name => 'HueAdjustment',
916# Unknown => 1,
917# ValueConv => '$val - 10',
918# ValueConvInv => '$val + 10',
919# },
920 0x46 => {
921 Name => 'Rotation',
922 PrintConv => {
923 72 => 'Horizontal (normal)',
924 76 => 'Rotate 90 CW',
925 82 => 'Rotate 270 CW',
926 },
927 },
928 0x47 => {
929 Name => 'FNumber',
930 ValueConv => '2 ** (($val-8)/16)',
931 ValueConvInv => '8 + 16*log($val)/log(2)',
932 PrintConv => 'sprintf("%.1f",$val)',
933 PrintConvInv => '$val',
934 },
935 0x48 => {
936 Name => 'ExposureTime',
937 ValueConv => '2 ** ((48-$val)/8)',
938 ValueConvInv => '48 - 8*log($val)/log(2)',
939 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
940 PrintConvInv => 'eval $val',
941 },
942 0x4a => 'FreeMemoryCardImages',
943 0x5e => {
944 Name => 'ImageNumber',
945 Notes => q{
946 this information may appear at index 98 (0x62), depending on firmware
947 version
948 },
949 ValueConv => '$val + 1',
950 ValueConvInv => '$val - 1',
951 },
952 0x60 => {
953 Name => 'NoiseReduction',
954 PrintConv => { 0 => 'Off', 1 => 'On' },
955 },
956 0x62 => {
957 Name => 'ImageNumber2',
958 ValueConv => '$val + 1',
959 ValueConvInv => '$val - 1',
960 },
961 0x71 => {
962 Name => 'ImageStabilization',
963 PrintConv => { 0 => 'Off', 1 => 'On' },
964 },
965 0x75 => {
966 Name => 'ZoneMatchingOn',
967 PrintConv => { 0 => 'Off', 1 => 'On' },
968 },
969);
970
971# Camera settings used by the 5D (ref 8)
972%Image::ExifTool::Minolta::CameraSettings5D = (
973 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
974 WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
975 CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
976 WRITABLE => 1,
977 PRIORITY => 0,
978 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
979 FORMAT => 'int16u',
980 FIRST_ENTRY => 0,
981 0x0a => {
982 Name => 'ExposureMode',
983 PrintConv => {
984 0 => 'Program',
985 1 => 'Aperture Priority',
986 2 => 'Shutter Priority',
987 3 => 'Manual',
988 4 => 'Auto?',
989 4131 => 'Connected Copying?',
990 },
991 },
992 0x0c => { #PH
993 Name => 'MinoltaImageSize',
994 PrintConv => {
995 0 => 'Large',
996 1 => 'Medium',
997 2 => 'Small',
998 },
999 },
1000 0x0d => {
1001 Name => 'MinoltaQuality',
1002 PrintConv => {
1003 0 => 'RAW',
1004 16 => 'Fine', #PH
1005 32 => 'Normal', #PH
1006 34 => 'RAW+JPEG',
1007 48 => 'Economy', #PH
1008 },
1009 },
1010 0x0e => {
1011 Name => 'WhiteBalance',
1012 PrintConv => {
1013 0 => 'Auto',
1014 1 => 'Daylight',
1015 2 => 'Cloudy',
1016 3 => 'Shade',
1017 4 => 'Tungsten',
1018 5 => 'Fluorescent',
1019 6 => 'Flash',
1020 0x100 => 'Kelvin',
1021 0x200 => 'Manual',
1022 },
1023 },
1024 # 0x0f-0x11 something to do with WB RGB levels as shot? (PH)
1025 # 0x12-0x17 RGB levels for other WB modes (with G missing)? (PH)
1026 0x1f => { #PH
1027 Name => 'Flash',
1028 PrintConv => {
1029 0 => 'Did not fire',
1030 1 => 'Fired',
1031 },
1032 },
1033# needs verification:
1034# 0x20 => { #10
1035# Name => 'FlashMode',
1036# PrintConv => {
1037# 0 => 'Normal',
1038# 1 => 'Red-eye reduction',
1039# 2 => 'Rear flash sync',
1040# },
1041# },
1042 0x25 => {
1043 Name => 'MeteringMode',
1044 PrintConv => {
1045 0 => 'Multi-segment',
1046 1 => 'Center weighted',
1047 2 => 'Spot',
1048 },
1049 },
1050 0x26 => {
1051 Name => 'ISOSetting',
1052 PrintConv => {
1053 0 => 'Auto',
1054 1 => 100,
1055 3 => 200,
1056 4 => 400,
1057 5 => 800,
1058 6 => 1600,
1059 7 => 3200,
1060 8 => '200 (Zone Matching High)',
1061 10 => '80 (Zone Matching Low)',
1062 },
1063 },
1064# looks wrong:
1065# 0x28 => { #10
1066# Name => 'ExposureCompensation',
1067# ValueConv => '$val / 24',
1068# ValueConvInv => '$val * 24',
1069# },
1070# needs verification:
1071# 0x2f => { #10
1072# Name => 'ColorSpace',
1073# PrintConv => {
1074# 0 => 'Natural sRGB',
1075# 1 => 'Natural+ sRGB',
1076# 2 => 'Monochrome',
1077# 4 => 'Adobe RGB (ICC)',
1078# 5 => 'Adobe RGB',
1079# },
1080# },
1081 0x30 => {
1082 Name => 'Sharpness',
1083 ValueConv => '$val - 10',
1084 ValueConvInv => '$val + 10',
1085 },
1086 0x31 => {
1087 Name => 'Contrast',
1088 ValueConv => '$val - 10',
1089 ValueConvInv => '$val + 10',
1090 },
1091 0x32 => {
1092 Name => 'Saturation',
1093 ValueConv => '$val - 10',
1094 ValueConvInv => '$val + 10',
1095 },
1096 0x35 => { #PH
1097 Name => 'ExposureTime',
1098 ValueConv => '2 ** ((48-$val)/8)',
1099 ValueConvInv => '48 - 8*log($val)/log(2)',
1100 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
1101 PrintConvInv => 'eval $val',
1102 },
1103 0x36 => { #PH
1104 Name => 'FNumber',
1105 ValueConv => '2 ** (($val-8)/16)',
1106 ValueConvInv => '8 + 16*log($val)/log(2)',
1107 PrintConv => 'sprintf("%.1f",$val)',
1108 PrintConvInv => '$val',
1109 },
1110 0x37 => 'FreeMemoryCardImages',
1111 # 0x38 definitely not related to exposure comp as in ref 8 (PH)
1112 0x49 => { #PH
1113 Name => 'ColorTemperature',
1114 Format => 'int16s',
1115 ValueConv => '$val * 100',
1116 ValueConvInv => '$val / 100',
1117 },
1118# needs verification:
1119# 0x4a => { #10
1120# Name => 'HueAdjustment',
1121# ValueConv => '$val - 10',
1122# ValueConvInv => '$val + 10',
1123# },
1124 0x50 => {
1125 Name => 'Rotation',
1126 PrintConv => {
1127 72 => 'Horizontal (normal)',
1128 76 => 'Rotate 90 CW',
1129 82 => 'Rotate 270 CW',
1130 },
1131 },
1132 0x53 => {
1133 Name => 'ExposureCompensation',
1134 ValueConv => '$val / 100 - 3',
1135 ValueConvInv => '($val + 3) * 100',
1136 PrintConv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1137 PrintConvInv => 'eval $val',
1138 },
1139 0x54 => 'FreeMemoryCardImages',
1140# needs verification:
1141# 0x65 => { #10
1142# Name => 'Rotation',
1143# PrintConv => {
1144# 0 => 'Horizontal (normal)',
1145# 1=> 'Rotate 90 CW',
1146# 2 => 'Rotate 270 CW',
1147# },
1148# },
1149 # 0x66 maybe program mode or some setting like this? (PH)
1150 0x6e => { #10
1151 Name => 'ColorTemperature',
1152 Format => 'int16s',
1153 ValueConv => '$val * 100',
1154 ValueConvInv => '$val / 100',
1155 },
1156# needs verification:
1157# 0x71 => { #10
1158# Name => 'PictureFinish',
1159# PrintConv => {
1160# 0 => 'Natural',
1161# 1 => 'Natural+',
1162# 2 => 'Portrait',
1163# 3 => 'Wind Scene',
1164# 4 => 'Evening Scene',
1165# 5 => 'Night Scene',
1166# 6 => 'Night Portrait',
1167# 7 => 'Monochrome',
1168# 8 => 'Adobe RGB',
1169# 9 => 'Adobe RGB (ICC)',
1170# },
1171# },
1172 # 0x95 FlashStrength? (PH)
1173 # 0xa4 similar information to 0x27, except with different values
1174 0xae => {
1175 Name => 'ImageNumber',
1176 ValueConv => '$val + 1',
1177 ValueConvInv => '$val - 1',
1178 },
1179 0xb0 => {
1180 Name => 'NoiseReduction',
1181 PrintConv => { 0 => 'Off', 1 => 'On' },
1182 },
1183 0xbd => {
1184 Name => 'ImageStabilization',
1185 PrintConv => { 0 => 'Off', 1 => 'On' },
1186 },
1187);
1188
1189# Camera settings used by the Sony DSLR-A100 (ref PH)
1190%Image::ExifTool::Minolta::CameraSettingsA100 = (
1191 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1192 WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1193 CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1194 NOTES => 'Camera settings information for the Sony DSLR-A100.',
1195 WRITABLE => 1,
1196 PRIORITY => 0,
1197 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1198 FORMAT => 'int16u',
1199 FIRST_ENTRY => 0,
1200 0x00 => { #15
1201 Name => 'ExposureMode',
1202 PrintHex => 1,
1203 PrintConv => {
1204 0 => 'Program',
1205 1 => 'Aperture Priority',
1206 2 => 'Shutter Priority',
1207 3 => 'Manual',
1208 4 => 'Auto',
1209 0x1013 => 'Portrait',
1210 0x1053 => 'Landscape',
1211 },
1212 },
1213 0x01 => { #15
1214 Name => 'ExposureCompensation',
1215 ValueConv => '$val / 100 - 3',
1216 ValueConvInv => 'int(($val + 3) * 100 + 0.5)',
1217 },
1218 # 0x09 some sort of APEX value (ref 15)
1219 0x0b => { #15
1220 Name => 'WhiteBalance',
1221 PrintHex => 1,
1222 PrintConv => {
1223 0 => 'Auto',
1224 1 => 'Daylight',
1225 2 => 'Cloudy',
1226 3 => 'Shade',
1227 4 => 'Tungsten',
1228 5 => 'Fluorescent',
1229 6 => 'Flash',
1230 0x100 => 'Kelvin',
1231 0x200 => 'Manual',
1232 },
1233 },
1234 # 0x12 => 'MeteringMode' (ref 15)
1235 # 0x13 => 'ISO' (ref 15)
1236 # 0x14 => 'ZoneMatching' (ref 15)
1237 # 0x15 => 'DynamicRangeOptimizer' (ref 15)
1238 0x16 => { #15
1239 Name => 'ColorMode',
1240 PrintConv => {
1241 0 => 'Standard',
1242 1 => 'Vivid',
1243 2 => 'Portrait',
1244 3 => 'Landscape',
1245 4 => 'Sunset',
1246 5 => 'Night Scene',
1247 7 => 'B&W',
1248 8 => 'Adobe RGB',
1249 },
1250 },
1251 # 0x17 => 'ColorSpace' (ref 15)
1252 0x18 => { #15
1253 Name => 'Sharpness',
1254 ValueConv => '$val - 10',
1255 ValueConvInv => '$val + 10',
1256 PrintConv => 'Image::ExifTool::Exif::PrintParameter($val)',
1257 PrintConvInv => '$val=~/normal/i ? 0 : $val',
1258 },
1259 0x19 => { #15
1260 Name => 'Contrast',
1261 ValueConv => '$val - 10',
1262 ValueConvInv => '$val + 10',
1263 PrintConv => 'Image::ExifTool::Exif::PrintParameter($val)',
1264 PrintConvInv => '$val=~/normal/i ? 0 : $val',
1265 },
1266 0x1a => { #15
1267 Name => 'Saturation',
1268 ValueConv => '$val - 10',
1269 ValueConvInv => '$val + 10',
1270 PrintConv => 'Image::ExifTool::Exif::PrintParameter($val)',
1271 PrintConvInv => '$val=~/normal/i ? 0 : $val',
1272 },
1273 0x1e => { #PH
1274 Name => 'DriveMode',
1275 PrintConv => {
1276 0 => 'Single Frame',
1277 1 => 'Continuous',
1278 2 => 'Self-Timer',
1279 3 => 'Continuous Bracketing',
1280 4 => 'Single-Frame Bracketing',
1281 5 => 'White Balance Bracketing',
1282 },
1283 },
1284 0x3f => { #PH
1285 Name => 'NoiseReduction',
1286 PrintConv => { 0 => 'Off', 1 => 'On' },
1287 },
1288 0x5a => { #15
1289 Name => 'Rotation',
1290 PrintConv => {
1291 0 => 'Horizontal (Normal)',
1292 1 => 'Rotate 270 CW',
1293 2 => 'Rotate 90 CW',
1294 },
1295 },
1296 0x5e => { #15
1297 Name => 'ColorTemperature',
1298 ValueConv => '$val * 100',
1299 ValueConvInv => '$val / 100',
1300 },
1301 0x87 => { #15
1302 Name => 'ImageStabilization',
1303 Writable => 'int32u',
1304 PrintConv => { 0 => 'Off', 1 => 'On' },
1305 },
1306);
1307
1308# basic Minolta white balance lookup
1309my %minoltaWhiteBalance = (
1310 0 => 'Auto',
1311 1 => 'Daylight',
1312 2 => 'Cloudy',
1313 3 => 'Tungsten',
1314 5 => 'Custom',
1315 7 => 'Fluorescent',
1316 8 => 'Fluorescent 2',
1317 11 => 'Custom 2',
1318 12 => 'Custom 3',
1319 # the following come from tests with the A2 (ref 2)
1320 0x0800000 => 'Auto',
1321 0x1800000 => 'Daylight',
1322 0x2800000 => 'Cloudy',
1323 0x3800000 => 'Tungsten',
1324 0x4800000 => 'Flash',
1325 0x5800000 => 'Fluorescent',
1326 0x6800000 => 'Shade',
1327 0x7800000 => 'Custom1',
1328 0x8800000 => 'Custom2',
1329 0x9800000 => 'Custom3',
1330);
1331
1332#------------------------------------------------------------------------------
1333# PrintConv for Minolta white balance
1334sub ConvertWhiteBalance($)
1335{
1336 my $val = shift;
1337 my $printConv = $minoltaWhiteBalance{$val};
1338 unless (defined $printConv) {
1339 if ($val & 0xffff0000) {
1340 # the A2 values can be shifted by += 3 settings, where
1341 # each setting adds or subtracts 0x0010000 (ref 2)
1342 my $type = ($val & 0xff000000) + 0x800000;
1343 if ($minoltaWhiteBalance{$type}) {
1344 $printConv = $minoltaWhiteBalance{$type} .
1345 sprintf("%+.8g", ($val - $type) / 0x10000);
1346 } else {
1347 $printConv = sprintf("Unknown (0x%x)", $val);
1348 }
1349 } else {
1350 $printConv = sprintf("Unknown ($val)");
1351 }
1352 }
1353 return $printConv;
1354}
1355
13561; # end
1357
1358__END__
1359
1360=head1 NAME
1361
1362Image::ExifTool::Minolta - Minolta EXIF maker notes tags
1363
1364=head1 SYNOPSIS
1365
1366This module is loaded automatically by Image::ExifTool when required.
1367
1368=head1 DESCRIPTION
1369
1370This module contains definitions required by Image::ExifTool to interpret
1371Minolta and Konica-Minolta maker notes in EXIF information, and to read
1372and write Minolta RAW (MRW) images.
1373
1374=head1 AUTHOR
1375
1376Copyright 2003-2007, Phil Harvey (phil at owl.phy.queensu.ca)
1377
1378This library is free software; you can redistribute it and/or modify it
1379under the same terms as Perl itself.
1380
1381=head1 REFERENCES
1382
1383=over 4
1384
1385=item L<http://www.dalibor.cz/minolta/makernote.htm>
1386
1387=item L<http://www.cybercom.net/~dcoffin/dcraw/>
1388
1389=back
1390
1391=head1 ACKNOWLEDGEMENTS
1392
1393Thanks to Jay Al-Saadi, Niels Kristian Bech Jensen, Shingo Noguchi, Pedro
1394Corte-Real and Jeffery Small for the information they provided.
1395
1396=head1 SEE ALSO
1397
1398L<Image::ExifTool::TagNames/Minolta Tags>,
1399L<Image::ExifTool(3pm)|Image::ExifTool>
1400
1401=cut
Note: See TracBrowser for help on using the repository browser.