source: gsdl/trunk/perllib/cpan/Image/ExifTool/Olympus.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: 67.5 KB
Line 
1#------------------------------------------------------------------------------
2# File: Olympus.pm
3#
4# Description: Olympus/Epson EXIF maker notes tags
5#
6# Revisions: 12/09/2003 - P. Harvey Created
7# 11/11/2004 - P. Harvey Added Epson support
8#
9# References: 1) http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html
10# 2) http://www.cybercom.net/~dcoffin/dcraw/
11# 3) http://www.ozhiker.com/electronics/pjmt/jpeg_info/olympus_mn.html
12# 4) Markku HŠnninen private communication (tests with E-1)
13# 5) RŽmi Guyomarch from http://forums.dpreview.com/forums/read.asp?forum=1022&message=12790396
14# 6) Frank Ledwon private communication (tests with E/C-series cameras)
15# 7) Michael Meissner private communication
16# 8) Shingo Noguchi, PhotoXP (http://www.daifukuya.com/photoxp/)
17# 9) Mark Dapoz private communication
18# 10) Lilo Huang private communication (E-330)
19# 11) http://olypedia.de/Olympus_Makernotes
20# 12) Ioannis Panagiotopoulos private communication (E-510)
21#------------------------------------------------------------------------------
22
23package Image::ExifTool::Olympus;
24
25use strict;
26use vars qw($VERSION);
27use Image::ExifTool::Exif;
28use Image::ExifTool::APP12;
29
30$VERSION = '1.40';
31
32my %offOn = ( 0 => 'Off', 1 => 'On' );
33
34%Image::ExifTool::Olympus::Main = (
35 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
36 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
37 WRITABLE => 1,
38 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
39#
40# Tags 0x0000 through 0x0103 are the same as Konica/Minolta cameras (ref 3)
41#
42 0x0000 => {
43 Name => 'MakerNoteVersion',
44 Writable => 'undef',
45 },
46 0x0001 => {
47 Name => 'MinoltaCameraSettingsOld',
48 SubDirectory => {
49 TagTable => 'Image::ExifTool::Minolta::CameraSettings',
50 ByteOrder => 'BigEndian',
51 },
52 },
53 0x0003 => {
54 Name => 'MinoltaCameraSettings',
55 SubDirectory => {
56 TagTable => 'Image::ExifTool::Minolta::CameraSettings',
57 ByteOrder => 'BigEndian',
58 },
59 },
60 0x0040 => {
61 Name => 'CompressedImageSize',
62 Writable => 'int32u',
63 },
64 0x0081 => {
65 Name => 'PreviewImageData',
66 Binary => 1,
67 Writable => 0,
68 },
69 0x0088 => {
70 Name => 'PreviewImageStart',
71 Flags => 'IsOffset',
72 OffsetPair => 0x0089, # point to associated byte count
73 DataTag => 'PreviewImage',
74 Writable => 0,
75 Protected => 2,
76 },
77 0x0089 => {
78 Name => 'PreviewImageLength',
79 OffsetPair => 0x0088, # point to associated offset
80 DataTag => 'PreviewImage',
81 Writable => 0,
82 Protected => 2,
83 },
84 0x0100 => {
85 Name => 'ThumbnailImage',
86 Writable => 'undef',
87 WriteCheck => '$self->CheckImage(\$val)',
88 Binary => 1,
89 },
90 0x0101 => {
91 Name => 'ColorMode',
92 Writable => 'int16u',
93 PrintConv => {
94 0 => 'Natural color',
95 1 => 'Black&white',
96 2 => 'Vivid color',
97 3 => 'Solarization',
98 4 => 'Adobe RGB',
99 },
100 },
101 0x0102 => {
102 Name => 'MinoltaQuality',
103 Writable => 'int16u',
104 PrintConv => {
105 0 => 'Raw',
106 1 => 'Superfine',
107 2 => 'Fine',
108 3 => 'Normal',
109 4 => 'Economy',
110 5 => 'Extra fine',
111 },
112 },
113 # (0x0103 is the same as 0x0102 above)
114 0x0103 => {
115 Name => 'MinoltaQuality',
116 Writable => 'int16u',
117 PrintConv => {
118 0 => 'Raw',
119 1 => 'Superfine',
120 2 => 'Fine',
121 3 => 'Normal',
122 4 => 'Economy',
123 5 => 'Extra fine',
124 },
125 },
126 0x0104 => { #11
127 Name => 'BodyFirmwareVersion',
128 Writable => 'string',
129 },
130#
131# end Konica/Minolta tags
132#
133 0x0200 => {
134 Name => 'SpecialMode',
135 Notes => q{
136 3 numbers: 1. Shooting mode: 0=Normal, 2=Fast, 3=Panorama;
137 2. Sequence Number; 3. Panorama Direction: 1=Left-Right,
138 2=Right-Left, 3=Bottom-Top, 4=Top-Bottom
139 },
140 Writable => 'int32u',
141 Count => 3,
142 PrintConv => sub { #3
143 my $val = shift;
144 my @v = split ' ', $val;
145 return $val unless @v >= 3;
146 my @v0 = ('Normal','Unknown (1)','Fast','Panorama');
147 my @v2 = ('(none)','Left to Right','Right to Left','Bottom to Top','Top to Bottom');
148 $val = $v0[$v[0]] || "Unknown ($v[0])";
149 $val .= ", Sequence: $v[1]";
150 $val .= ', Panorama: ' . ($v2[$v[2]] || "Unknown ($v[2])");
151 return $val;
152 },
153 },
154 0x0201 => {
155 Name => 'Quality',
156 Writable => 'int16u',
157 Notes => q{
158 Quality values are decoded based on the CameraType tag. All types
159 represent SQ, HQ and SHQ as sequential integers, but in general
160 SX-type cameras start with a value of 0 for SQ while others start
161 with 1
162 },
163 # These values are different for different camera types
164 # (can't have Condition based on CameraType because it isn't known
165 # when this tag is extracted)
166 PrintConv => sub {
167 my ($val, $self) = @_;
168 my %t1 = ( # all SX camera types except SX151
169 0 => 'SQ (Low)',
170 1 => 'HQ (Normal)',
171 2 => 'SHQ (Fine)',
172 6 => 'RAW', #PH - C5050WZ
173 );
174 my %t2 = ( # all other types
175 1 => 'SQ (Low)',
176 2 => 'HQ (Normal)',
177 3 => 'SHQ (Fine)',
178 4 => 'RAW',
179 5 => 'Medium-Fine', #PH
180 6 => 'Small-Fine', #PH
181 33 => 'Uncompressed', #PH - C2100Z
182 );
183 my $conv = $self->{CameraType} =~ /^SX(?!151\b)/ ? \%t1 : \%t2;
184 return $$conv{$val} ? $$conv{$val} : "Unknown ($val)";
185 },
186 # (no PrintConvInv because we don't know CameraType at write time)
187 },
188 0x0202 => {
189 Name => 'Macro',
190 Writable => 'int16u',
191 PrintConv => {
192 0 => 'Off',
193 1 => 'On',
194 2 => 'Super Macro', #6
195 },
196 },
197 0x0203 => { #6
198 Name => 'BWMode',
199 Description => 'Black & White Mode',
200 Writable => 'int16u',
201 PrintConv => \%offOn,
202 },
203 0x0204 => {
204 Name => 'DigitalZoom',
205 Writable => 'rational64u',
206 PrintConv => '$val=~/\./ or $val.=".0"; $val',
207 PrintConvInv => '$val',
208 },
209 0x0205 => { #6
210 Name => 'FocalPlaneDiagonal',
211 Writable => 'rational64u',
212 PrintConv => '"$val mm"',
213 PrintConvInv => '$val=~s/\s*mm$//;$val',
214 },
215 0x0206 => { #6
216 Name => 'LensDistortionParams',
217 Writable => 'int16s',
218 Count => 6,
219 },
220 0x0207 => { #PH (was incorrectly FirmwareVersion, ref 1,3)
221 Name => 'CameraType',
222 Writable => 'string',
223 DataMember => 'CameraType',
224 RawConv => '$self->{CameraType} = $val',
225 },
226 0x0208 => {
227 Name => 'TextInfo',
228 SubDirectory => {
229 TagTable => 'Image::ExifTool::Olympus::TextInfo',
230 },
231 },
232 0x0209 => {
233 Name => 'CameraID',
234 Format => 'string', # this really should have been a string
235 },
236 0x020b => { #PH
237 Name => 'EpsonImageWidth',
238 Writable => 'int16u',
239 },
240 0x020c => { #PH
241 Name => 'EpsonImageHeight',
242 Writable => 'int16u',
243 },
244 0x020d => { #PH
245 Name => 'EpsonSoftware',
246 Writable => 'string',
247 },
248 0x0280 => { #PH
249 %Image::ExifTool::previewImageTagInfo,
250 Notes => 'found in ERF and JPG images from some Epson models',
251 Format => 'undef',
252 Writable => 'int8u',
253 },
254 0x0300 => { #6
255 Name => 'PreCaptureFrames',
256 Writable => 'int16u',
257 },
258 0x0301 => { #11
259 Name => 'WhiteBoard',
260 Writable => 'int16u',
261 },
262 0x0302 => { #6
263 Name => 'OneTouchWB',
264 Writable => 'int16u',
265 PrintConv => {
266 0 => 'Off',
267 1 => 'On',
268 2 => 'On (Preset)',
269 },
270 },
271 0x0303 => { #11
272 Name => 'WhiteBalanceBracket',
273 Writable => 'int16u',
274 },
275 0x0304 => { #11
276 Name => 'WhiteBalanceBias',
277 Writable => 'int16u',
278 },
279 # 0x0305 => 'PrintMaching', ? #11
280 0x0403 => { #11
281 Name => 'SceneMode',
282 Writable => 'int16u',
283 PrintConv => {
284 0 => 'Normal',
285 1 => 'Standard',
286 2 => 'Auto',
287 4 => 'Portrait',
288 5 => 'Landscape+Portrait',
289 6 => 'Landscape',
290 7 => 'Night Scene',
291 8 => 'Night+Portrait',
292 9 => 'Sport',
293 10 => 'Self Portrait',
294 11 => 'Indoor',
295 12 => 'Beach&Snow',
296 13 => 'Beach',
297 14 => 'Snow',
298 15 => 'Self Portrait+Self Timer',
299 16 => 'Sunset',
300 17 => 'Cuisine',
301 18 => 'Documents',
302 19 => 'Candle',
303 20 => 'Fireworks',
304 21 => 'Available Light',
305 22 => 'Vivid',
306 23 => 'Underwater Wide1',
307 24 => 'Underwater Macro',
308 25 => 'Museum',
309 26 => 'Behind Glass',
310 27 => 'Auction',
311 28 => 'Shoot&Select1',
312 29 => 'Shoot&Select2',
313 30 => 'Underwater Wide2',
314 31 => 'Digital Image Stabilization',
315 32 => 'Face Portrait',
316 33 => 'Pet',
317 },
318 },
319 0x0404 => { #PH (D595Z, C7070WZ)
320 Name => 'SerialNumber',
321 Writable => 'string',
322 },
323 0x0405 => { #11
324 Name => 'Firmware',
325 Writable => 'string',
326 },
327 0x0e00 => {
328 Name => 'PrintIM',
329 Description => 'Print Image Matching',
330 Writable => 0,
331 SubDirectory => {
332 TagTable => 'Image::ExifTool::PrintIM::Main',
333 },
334 },
335 0x0f00 => {
336 Name => 'DataDump',
337 Writable => 0,
338 Binary => 1,
339 },
340 0x0f01 => { #6
341 Name => 'DataDump2',
342 Writable => 0,
343 Binary => 1,
344 },
345 0x1000 => { #6
346 Name => 'ShutterSpeedValue',
347 Writable => 'rational64s',
348 Priority => 0,
349 ValueConv => 'abs($val)<100 ? 1/(2**$val) : 0',
350 ValueConvInv => '$val>0 ? -log($val)/log(2) : -100',
351 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
352 PrintConvInv => 'eval $val',
353 },
354 0x1001 => { #6
355 Name => 'ISOValue',
356 Writable => 'rational64s',
357 Priority => 0,
358 ValueConv => '100 * 2 ** ($val - 5)',
359 ValueConvInv => '$val>0 ? log($val/100)/log(2)+5 : 0',
360 PrintConv => 'int($val * 100 + 0.5) / 100',
361 PrintConvInv => '$val',
362 },
363 0x1002 => { #6
364 Name => 'ApertureValue',
365 Writable => 'rational64s',
366 Priority => 0,
367 ValueConv => '2 ** ($val / 2)',
368 ValueConvInv => '$val>0 ? 2*log($val)/log(2) : 0',
369 PrintConv => 'sprintf("%.1f",$val)',
370 PrintConvInv => '$val',
371 },
372 0x1003 => { #6
373 Name => 'BrightnessValue',
374 Writable => 'rational64s',
375 Priority => 0,
376 },
377 0x1004 => { #3
378 Name => 'FlashMode',
379 Writable => 'int16u',
380 PrintConv => {
381 2 => 'On', #PH
382 3 => 'Off', #PH
383 },
384 },
385 0x1005 => { #6
386 Name => 'FlashDevice',
387 Writable => 'int16u',
388 PrintConv => {
389 0 => 'None',
390 1 => 'Internal',
391 4 => 'External',
392 5 => 'Internal + External',
393 },
394 },
395 0x1006 => { #6
396 Name =>'ExposureCompensation',
397 Writable => 'rational64s',
398 },
399 0x1007 => { #6
400 Name => 'SensorTemperature',
401 Writable => 'int16s',
402 },
403 0x1008 => { #6
404 Name => 'LensTemperature',
405 Writable => 'int16s',
406 },
407 0x1009 => { #11
408 Name => 'LightCondition',
409 Writable => 'int16u',
410 },
411 0x100a => { #11
412 Name => 'FocusRange',
413 Writable => 'int16u',
414 PrintConv => {
415 0 => 'Normal',
416 1 => 'Macro',
417 },
418 },
419 0x100b => { #6
420 Name => 'FocusMode',
421 Writable => 'int16u',
422 PrintConv => {
423 0 => 'Auto',
424 1 => 'Manual',
425 },
426 },
427 0x100c => { #6
428 Name => 'ManualFocusDistance',
429 Writable => 'rational64u',
430 PrintConv => '"$val mm"', #11
431 PrintConvInv => '$val=~s/\s*mm$//; $val',
432 },
433 0x100d => { #6
434 Name => 'ZoomStepCount',
435 Writable => 'int16u',
436 },
437 0x100e => { #6
438 Name => 'FocusStepCount',
439 Writable => 'int16u',
440 },
441 0x100f => { #6
442 Name => 'Sharpness',
443 Writable => 'int16u',
444 Priority => 0,
445 PrintConv => {
446 0 => 'Normal',
447 1 => 'Hard',
448 2 => 'Soft',
449 },
450 },
451 0x1010 => { #6
452 Name => 'FlashChargeLevel',
453 Writable => 'int16u',
454 },
455 0x1011 => { #3
456 Name => 'ColorMatrix',
457 Writable => 'int16u',
458 Format => 'int16s',
459 Count => 9,
460 },
461 0x1012 => { #3
462 Name => 'BlackLevel',
463 Writable => 'int16u',
464 Count => 4,
465 },
466 0x1013 => { #11
467 Name => 'ColorTemperatureBG',
468 Writable => 'int16u',
469 Unknown => 1, # (doesn't look like a temperature)
470 },
471 0x1014 => { #11
472 Name => 'ColorTemperatureRG',
473 Writable => 'int16u',
474 Unknown => 1, # (doesn't look like a temperature)
475 },
476 0x1015 => { #6
477 Name => 'WBMode',
478 Writable => 'int16u',
479 Count => 2,
480 PrintConv => {
481 '1' => 'Auto',
482 '1 0' => 'Auto',
483 '1 2' => 'Auto (2)',
484 '1 4' => 'Auto (4)',
485 '2 2' => '3000 Kelvin',
486 '2 3' => '3700 Kelvin',
487 '2 4' => '4000 Kelvin',
488 '2 5' => '4500 Kelvin',
489 '2 6' => '5500 Kelvin',
490 '2 7' => '6500 Kelvin',
491 '2 8' => '7500 Kelvin',
492 '3 0' => 'One-touch',
493 },
494 },
495 0x1017 => { #2
496 Name => 'RedBalance',
497 Writable => 'int16u',
498 Count => 2,
499 ValueConv => '$val=~s/ .*//; $val / 256',
500 ValueConvInv => '$val*=256;"$val 64"',
501 },
502 0x1018 => { #2
503 Name => 'BlueBalance',
504 Writable => 'int16u',
505 Count => 2,
506 ValueConv => '$val=~s/ .*//; $val / 256',
507 ValueConvInv => '$val*=256;"$val 64"',
508 },
509 0x1019 => { #11
510 Name => 'ColorMatrixNumber',
511 Writable => 'int16u',
512 },
513 # 0x101a is same as CameraID ("OLYMPUS DIGITAL CAMERA") for C2500L - PH
514 0x101a => { #3
515 Name => 'SerialNumber',
516 Writable => 'string',
517 },
518 0x101b => { #11
519 Name => 'ExternalFlashAE1_0',
520 Writable => 'int32u',
521 Unknown => 1, # (what are these?)
522 },
523 0x101c => { #11
524 Name => 'ExternalFlashAE2_0',
525 Writable => 'int32u',
526 Unknown => 1,
527 },
528 0x101d => { #11
529 Name => 'InternalFlashAE1_0',
530 Writable => 'int32u',
531 Unknown => 1,
532 },
533 0x101e => { #11
534 Name => 'InternalFlashAE2_0',
535 Writable => 'int32u',
536 Unknown => 1,
537 },
538 0x101f => { #11
539 Name => 'ExternalFlashAE1',
540 Writable => 'int32u',
541 Unknown => 1,
542 },
543 0x1020 => { #11
544 Name => 'ExternalFlashAE2',
545 Writable => 'int32u',
546 Unknown => 1,
547 },
548 0x1021 => { #11
549 Name => 'InternalFlashAE1',
550 Writable => 'int32u',
551 Unknown => 1,
552 },
553 0x1022 => { #11
554 Name => 'InternalFlashAE2',
555 Writable => 'int32u',
556 Unknown => 1,
557 },
558 0x1023 => { #6
559 Name => 'FlashExposureComp',
560 Writable => 'rational64s',
561 },
562 0x1024 => { #11
563 Name => 'InternalFlashTable',
564 Writable => 'int16u',
565 },
566 0x1025 => { #11
567 Name => 'ExternalFlashGValue',
568 Writable => 'rational64s',
569 },
570 0x1026 => { #6
571 Name => 'ExternalFlashBounce',
572 Writable => 'int16u',
573 PrintConv => {
574 0 => 'No',
575 1 => 'Yes',
576 },
577 },
578 0x1027 => { #6
579 Name => 'ExternalFlashZoom',
580 Writable => 'int16u',
581 },
582 0x1028 => { #6
583 Name => 'ExternalFlashMode',
584 Writable => 'int16u',
585 },
586 0x1029 => { #3
587 Name => 'Contrast',
588 Writable => 'int16u',
589 PrintConv => { #PH (works with E1)
590 0 => 'High',
591 1 => 'Normal',
592 2 => 'Low',
593 },
594 },
595 0x102a => { #3
596 Name => 'SharpnessFactor',
597 Writable => 'int16u',
598 },
599 0x102b => { #3
600 Name => 'ColorControl',
601 Writable => 'int16u',
602 Count => 6,
603 },
604 0x102c => { #3
605 Name => 'ValidBits',
606 Writable => 'int16u',
607 Count => 2,
608 },
609 0x102d => { #3
610 Name => 'CoringFilter',
611 Writable => 'int16u',
612 },
613 0x102e => { #PH
614 Name => 'OlympusImageWidth',
615 Writable => 'int32u',
616 },
617 0x102f => { #PH
618 Name => 'OlympusImageHeight',
619 Writable => 'int32u',
620 },
621 0x1030 => { #11
622 Name => 'SceneDetect',
623 Writable => 'int16u',
624 },
625 0x1031 => { #11
626 Name => 'SceneArea',
627 Writable => 'int32u',
628 Count => 8,
629 Unknown => 1, # (numbers don't make much sense?)
630 },
631 # 0x1032 HAFFINAL? #11
632 0x1033 => { #11
633 Name => 'SceneDetectArea',
634 Writable => 'int32u',
635 Count => 720,
636 Binary => 1,
637 Unknown => 1, # (but what does it mean?)
638 },
639 0x1034 => { #3
640 Name => 'CompressionRatio',
641 Writable => 'rational64u',
642 },
643 0x1035 => { #6
644 Name => 'PreviewImageValid',
645 Writable => 'int32u',
646 PrintConv => { 0 => 'No', 1 => 'Yes' },
647 },
648 0x1036 => { #6
649 Name => 'PreviewImageStart',
650 Flags => 'IsOffset',
651 OffsetPair => 0x1037, # point to associated byte count
652 DataTag => 'PreviewImage',
653 Writable => 'int32u',
654 Protected => 2,
655 },
656 0x1037 => { #6
657 Name => 'PreviewImageLength',
658 OffsetPair => 0x1036, # point to associated offset
659 DataTag => 'PreviewImage',
660 Writable => 'int32u',
661 Protected => 2,
662 },
663 0x1038 => { #11
664 Name => 'AFResult',
665 Writable => 'int16u',
666 },
667 0x1039 => { #6
668 Name => 'CCDScanMode',
669 Writable => 'int16u',
670 PrintConv => {
671 0 => 'Interlaced',
672 1 => 'Progressive',
673 },
674 },
675 0x103a => { #6
676 Name => 'NoiseReduction',
677 Writable => 'int16u',
678 PrintConv => {
679 0 => 'Off',
680 1 => 'On',
681 },
682 },
683 0x103b => { #6
684 Name => 'InfinityLensStep',
685 Writable => 'int16u',
686 },
687 0x103c => { #6
688 Name => 'NearLensStep',
689 Writable => 'int16u',
690 },
691 0x103d => { #11
692 Name => 'LightValueCenter',
693 Writable => 'rational64s',
694 },
695 0x103e => { #11
696 Name => 'LightValuePeriphery',
697 Writable => 'rational64s',
698 },
699 0x103f => { #11
700 Name => 'FieldCount',
701 Writable => 'int16u',
702 Unknown => 1, # (but what does it mean?)
703 },
704#
705# Olympus really screwed up the format of the following subdirectories (for the
706# E-1 and E-300 anyway). Not only is the subdirectory value data not included in
707# the size, but also the count is 2 bytes short for the subdirectory itself
708# (presumably the Olympus programmers forgot about the 2-byte entry count at the
709# start of the subdirectory). This mess is straightened out and these subdirs
710# are written properly when ExifTool rewrites the file. (This problem has been
711# fixed in the new-style MakerNoteOlympus2 maker notes since a standard SubIFD
712# offset value is used.) - PH
713#
714 0x2010 => [ #PH
715 {
716 Name => 'Equipment',
717 Condition => 'not $$self{OlympusType2}',
718 SubDirectory => {
719 TagTable => 'Image::ExifTool::Olympus::Equipment',
720 ByteOrder => 'Unknown',
721 },
722 },
723 {
724 Name => 'Equipment2',
725 Groups => { 1 => 'MakerNotes' }, # SubIFD needs group 1 set
726 Flags => 'SubIFD',
727 FixFormat => 'ifd',
728 SubDirectory => {
729 TagTable => 'Image::ExifTool::Olympus::Equipment',
730 Start => '$val',
731 },
732 },
733 ],
734 0x2020 => [ #PH
735 {
736 Name => 'CameraSettings',
737 Condition => 'not $$self{OlympusType2}',
738 SubDirectory => {
739 TagTable => 'Image::ExifTool::Olympus::CameraSettings',
740 ByteOrder => 'Unknown',
741 },
742 },
743 {
744 Name => 'CameraSettings2',
745 Groups => { 1 => 'MakerNotes' },
746 Flags => 'SubIFD',
747 FixFormat => 'ifd',
748 SubDirectory => {
749 TagTable => 'Image::ExifTool::Olympus::CameraSettings',
750 Start => '$val',
751 },
752 },
753 ],
754 0x2030 => [ #PH
755 {
756 Name => 'RawDevelopment',
757 Condition => 'not $$self{OlympusType2}',
758 SubDirectory => {
759 TagTable => 'Image::ExifTool::Olympus::RawDevelopment',
760 ByteOrder => 'Unknown',
761 },
762 },
763 {
764 Name => 'RawDevelopment2',
765 Groups => { 1 => 'MakerNotes' },
766 Flags => 'SubIFD',
767 FixFormat => 'ifd',
768 SubDirectory => {
769 TagTable => 'Image::ExifTool::Olympus::RawDevelopment',
770 Start => '$val',
771 },
772 },
773 ],
774 0x2031 => [ #11
775 {
776 Name => 'RawDev2',
777 Condition => 'not $$self{OlympusType2}',
778 SubDirectory => {
779 TagTable => 'Image::ExifTool::Olympus::RawDevelopment2',
780 ByteOrder => 'Unknown',
781 },
782 },
783 {
784 Name => 'RawDev2_2',
785 Groups => { 1 => 'MakerNotes' },
786 Flags => 'SubIFD',
787 FixFormat => 'ifd',
788 SubDirectory => {
789 TagTable => 'Image::ExifTool::Olympus::RawDevelopment2',
790 Start => '$val',
791 },
792 },
793 ],
794 0x2040 => [ #PH
795 {
796 Name => 'ImageProcessing',
797 Condition => 'not $$self{OlympusType2}',
798 SubDirectory => {
799 TagTable => 'Image::ExifTool::Olympus::ImageProcessing',
800 ByteOrder => 'Unknown',
801 },
802 },
803 {
804 Name => 'ImageProcessing2',
805 Groups => { 1 => 'MakerNotes' },
806 Flags => 'SubIFD',
807 FixFormat => 'ifd',
808 SubDirectory => {
809 TagTable => 'Image::ExifTool::Olympus::ImageProcessing',
810 Start => '$val',
811 },
812 },
813 ],
814 0x2050 => [ #PH
815 {
816 Name => 'FocusInfo',
817 Condition => 'not ($$self{OlympusType2} or $$self{OlympusCAMER})',
818 SubDirectory => {
819 TagTable => 'Image::ExifTool::Olympus::FocusInfo',
820 ByteOrder => 'Unknown',
821 },
822 },
823 {
824 Name => 'FocusInfo2',
825 Condition => 'not $$self{OlympusCAMER}',
826 Groups => { 1 => 'MakerNotes' },
827 Flags => 'SubIFD',
828 FixFormat => 'ifd',
829 SubDirectory => {
830 TagTable => 'Image::ExifTool::Olympus::FocusInfo',
831 Start => '$val',
832 },
833 },
834 {
835 # ASCII-based camera parameters if makernotes starts with "CAMER\0"
836 Name => 'CameraParameters',
837 Writable => 'undef',
838 Binary => 1,
839 },
840 ],
841 0x2100 => { #11
842 Name => 'Olympus2100',
843 SubDirectory => {
844 TagTable => 'Image::ExifTool::Olympus::FETags',
845 ByteOrder => 'Unknown',
846 },
847 },
848 0x2200 => { #11
849 Name => 'Olympus2200',
850 SubDirectory => {
851 TagTable => 'Image::ExifTool::Olympus::FETags',
852 ByteOrder => 'Unknown',
853 },
854 },
855 0x2300 => { #11
856 Name => 'Olympus2300',
857 SubDirectory => {
858 TagTable => 'Image::ExifTool::Olympus::FETags',
859 ByteOrder => 'Unknown',
860 },
861 },
862 0x2400 => { #11
863 Name => 'Olympus2400',
864 SubDirectory => {
865 TagTable => 'Image::ExifTool::Olympus::FETags',
866 ByteOrder => 'Unknown',
867 },
868 },
869 0x2500 => { #11
870 Name => 'Olympus2500',
871 SubDirectory => {
872 TagTable => 'Image::ExifTool::Olympus::FETags',
873 ByteOrder => 'Unknown',
874 },
875 },
876 0x2600 => { #11
877 Name => 'Olympus2600',
878 SubDirectory => {
879 TagTable => 'Image::ExifTool::Olympus::FETags',
880 ByteOrder => 'Unknown',
881 },
882 },
883 0x2700 => { #11
884 Name => 'Olympus2700',
885 SubDirectory => {
886 TagTable => 'Image::ExifTool::Olympus::FETags',
887 ByteOrder => 'Unknown',
888 },
889 },
890 0x2800 => { #11
891 Name => 'Olympus2800',
892 SubDirectory => {
893 TagTable => 'Image::ExifTool::Olympus::FETags',
894 ByteOrder => 'Unknown',
895 },
896 },
897 0x2900 => { #11
898 Name => 'Olympus2900',
899 SubDirectory => {
900 TagTable => 'Image::ExifTool::Olympus::FETags',
901 ByteOrder => 'Unknown',
902 },
903 },
904 0x3000 => [
905 { #6
906 Name => 'RawInfo',
907 Condition => 'not $$self{OlympusType2}',
908 SubDirectory => {
909 TagTable => 'Image::ExifTool::Olympus::RawInfo',
910 ByteOrder => 'Unknown',
911 },
912 },
913 { #PH
914 Name => 'RawInfo2',
915 Groups => { 1 => 'MakerNotes' },
916 Flags => 'SubIFD',
917 FixFormat => 'ifd',
918 SubDirectory => {
919 TagTable => 'Image::ExifTool::Olympus::RawInfo',
920 Start => '$val',
921 },
922 },
923 ],
924);
925
926# TextInfo tags
927%Image::ExifTool::Olympus::TextInfo = (
928 PROCESS_PROC => \&Image::ExifTool::APP12::ProcessAPP12,
929 NOTES => q{
930 This information is in text format (similar to APP12 information, but with
931 spaces instead of linefeeds). Below are tags which have been observed, but
932 any information found here will be extracted, even if the tag is not listed.
933 },
934 GROUPS => { 0 => 'MakerNotes', 1 => 'Olympus', 2 => 'Image' },
935 Resolution => { },
936 Type => {
937 Name => 'CameraType',
938 Groups => { 2 => 'Camera' },
939 DataMember => 'CameraType',
940 RawConv => '$self->{CameraType} = $val',
941 },
942);
943
944# Olympus Equipment IFD
945%Image::ExifTool::Olympus::Equipment = (
946 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
947 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
948 WRITABLE => 1,
949 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
950 0x000 => { #PH
951 Name => 'EquipmentVersion',
952 Writable => 'undef',
953 Count => 4,
954 },
955 0x100 => { #6
956 Name => 'CameraType2',
957 Writable => 'string',
958 Count => 6,
959 },
960 0x101 => { #PH
961 Name => 'SerialNumber',
962 Writable => 'string',
963 Count => 32,
964 PrintConv => '$val=~s/\s+$//;$val',
965 PrintConvInv => 'pack("A31",$val)', # pad with spaces to 31 chars
966 },
967 0x102 => { #6
968 Name => 'InternalSerialNumber',
969 Notes => '16 digits: 0-3=model, 4=year, 5-6=month, 8-12=unit number',
970 Writable => 'string',
971 Count => 32,
972 },
973 0x103 => { #6
974 Name => 'FocalPlaneDiagonal',
975 Writable => 'rational64u',
976 PrintConv => '"$val mm"',
977 PrintConvInv => '$val=~s/\s*mm$//;$val',
978 },
979 0x104 => { #6
980 Name => 'BodyFirmwareVersion',
981 Writable => 'int32u',
982 PrintConv => '$val=sprintf("%x",$val);$val=~s/(.{3})$/\.$1/;$val',
983 PrintConvInv => '$val=sprintf("%.3f",$val);$val=~s/\.//;hex($val)',
984 },
985 0x201 => { #6
986 Name => 'LensType',
987 Writable => 'int8u',
988 Count => 6,
989 Notes => '6 numbers: 1. Make, 2. Unknown, 3. Model, 4. Release, 5-6. Unknown',
990 PrintConv => 'Image::ExifTool::Olympus::PrintLensInfo($val,"Lens")',
991 },
992 # apparently the first 3 digits of the lens s/n give the type (ref 4):
993 # 010 = 50macro
994 # 040 = EC-14
995 # 050 = 14-54
996 # 060 = 50-200
997 # 080 = EX-25
998 # 101 = FL-50
999 0x202 => { #PH
1000 Name => 'LensSerialNumber',
1001 Writable => 'string',
1002 Count => 32,
1003 PrintConv => '$val=~s/\s+$//;$val',
1004 PrintConvInv => 'pack("A31",$val)', # pad with spaces to 31 chars
1005 },
1006 0x204 => { #6
1007 Name => 'LensFirmwareVersion',
1008 Writable => 'int32u',
1009 PrintConv => '$val=sprintf("%x",$val);$val=~s/(.{3})$/\.$1/;$val',
1010 PrintConvInv => '$val=sprintf("%.3f",$val);$val=~s/\.//;hex($val)',
1011 },
1012 0x205 => { #11
1013 Name => 'MaxApertureAtMinFocal',
1014 Writable => 'int16u',
1015 ValueConv => '$val ? sqrt(2)**($val/256) : 0',
1016 ValueConvInv => '$val>0 ? int(512*log($val)/log(2)+0.5) : 0',
1017 PrintConv => 'sprintf("%.1f",$val)',
1018 PrintConvInv => '$val',
1019 },
1020 0x206 => { #5
1021 Name => 'MaxApertureAtMaxFocal',
1022 Writable => 'int16u',
1023 ValueConv => '$val ? sqrt(2)**($val/256) : 0',
1024 ValueConvInv => '$val>0 ? int(512*log($val)/log(2)+0.5) : 0',
1025 PrintConv => 'sprintf("%.1f",$val)',
1026 PrintConvInv => '$val',
1027 },
1028 0x207 => { #PH
1029 Name => 'MinFocalLength',
1030 Writable => 'int16u',
1031 },
1032 0x208 => { #PH
1033 Name => 'MaxFocalLength',
1034 Writable => 'int16u',
1035 },
1036 0x20a => { #9
1037 Name => 'MaxApertureAtCurrentFocal',
1038 Writable => 'int16u',
1039 ValueConv => '$val ? sqrt(2)**($val/256) : 0',
1040 ValueConvInv => '$val>0 ? int(512*log($val)/log(2)+0.5) : 0',
1041 PrintConv => 'sprintf("%.1f",$val)',
1042 PrintConvInv => '$val',
1043 },
1044 0x20b => { #11
1045 Name => 'LensProperties',
1046 Writable => 'int16u',
1047 PrintConv => 'sprintf("0x%x",$val)',
1048 PrintConvInv => '$val',
1049 },
1050 0x301 => { #6
1051 Name => 'Extender',
1052 Writable => 'int8u',
1053 Count => 6,
1054 Notes => '6 numbers: 1. Make, 2. Unknown, 3. Model, 4. Release, 5-6. Unknown.',
1055 PrintConv => 'Image::ExifTool::Olympus::PrintLensInfo($val,"Extender")',
1056 },
1057 0x302 => { #4
1058 Name => 'ExtenderSerialNumber',
1059 Writable => 'string',
1060 Count => 32,
1061 },
1062 0x303 => { #9
1063 Name => 'ExtenderModel',
1064 Writable => 'string',
1065 },
1066 0x304 => { #6
1067 Name => 'ExtenderFirmwareVersion',
1068 Writable => 'int32u',
1069 PrintConv => '$val=sprintf("%x",$val);$val=~s/(.{3})$/\.$1/;$val',
1070 PrintConvInv => '$val=sprintf("%.3f",$val);$val=~s/\.//;hex($val)',
1071 },
1072 0x1000 => { #6
1073 Name => 'FlashType',
1074 Writable => 'int16u',
1075 PrintConv => {
1076 0 => 'None',
1077 2 => 'Simple E-System',
1078 3 => 'E-System',
1079 },
1080 },
1081 0x1001 => { #6
1082 Name => 'FlashModel',
1083 Writable => 'int16u',
1084 PrintConv => {
1085 0 => 'None',
1086 1 => 'FL-20',
1087 2 => 'FL-50',
1088 3 => 'RF-11',
1089 4 => 'TF-22',
1090 5 => 'FL-36',
1091 },
1092 },
1093 0x1002 => { #6
1094 Name => 'FlashFirmwareVersion',
1095 Writable => 'int32u',
1096 PrintConv => '$val=sprintf("%x",$val);$val=~s/(.{3})$/\.$1/;$val',
1097 PrintConvInv => '$val=sprintf("%.3f",$val);$val=~s/\.//;hex($val)',
1098 },
1099 0x1003 => { #4
1100 Name => 'FlashSerialNumber',
1101 Writable => 'string',
1102 Count => 32,
1103 },
1104);
1105
1106# Olympus camera settings IFD
1107%Image::ExifTool::Olympus::CameraSettings = (
1108 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
1109 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
1110 WRITABLE => 1,
1111 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1112 0x000 => { #PH
1113 Name => 'CameraSettingsVersion',
1114 Writable => 'undef',
1115 Count => 4,
1116 },
1117 0x100 => { #6
1118 Name => 'PreviewImageValid',
1119 Writable => 'int32u',
1120 PrintConv => { 0 => 'No', 1 => 'Yes' },
1121 },
1122 0x101 => { #PH
1123 Name => 'PreviewImageStart',
1124 Flags => 'IsOffset',
1125 OffsetPair => 0x102,
1126 DataTag => 'PreviewImage',
1127 Writable => 'int32u',
1128 Protected => 2,
1129 },
1130 0x102 => { #PH
1131 Name => 'PreviewImageLength',
1132 OffsetPair => 0x101,
1133 DataTag => 'PreviewImage',
1134 Writable => 'int32u',
1135 Protected => 2,
1136 },
1137 0x200 => { #4
1138 Name => 'ExposureMode',
1139 Writable => 'int16u',
1140 PrintConv => {
1141 1 => 'Manual',
1142 2 => 'Program', #6
1143 3 => 'Aperture-priority AE',
1144 4 => 'Shutter speed priority AE',
1145 5 => 'Program-shift', #6
1146 }
1147 },
1148 0x201 => { #6
1149 Name => 'AELock',
1150 Writable => 'int16u',
1151 PrintConv => {
1152 0 => 'Off',
1153 1 => 'On',
1154 },
1155 },
1156 0x202 => { #PH/4
1157 Name => 'MeteringMode',
1158 Writable => 'int16u',
1159 PrintConv => {
1160 2 => 'Center Weighted',
1161 3 => 'Spot',
1162 5 => 'ESP',
1163 261 => 'Pattern+AF', #6
1164 515 => 'Spot+Highlight control', #6
1165 1027 => 'Spot+Shadow control', #6
1166 },
1167 },
1168 0x300 => { #6
1169 Name => 'MacroMode',
1170 Writable => 'int16u',
1171 PrintConv => {
1172 0 => 'Off',
1173 1 => 'On',
1174 2 => 'Super Macro', #11
1175 },
1176 },
1177 0x301 => { #6
1178 Name => 'FocusMode',
1179 Writable => 'int16u',
1180 PrintConv => {
1181 0 => 'Single AF',
1182 1 => 'Sequential shooting AF',
1183 2 => 'Continuous AF',
1184 3 => 'Multi AF',
1185 10 => 'MF',
1186 },
1187 },
1188 0x302 => { #6
1189 Name => 'FocusProcess',
1190 Writable => 'int16u',
1191 PrintConv => {
1192 0 => 'AF Not Used',
1193 1 => 'AF Used',
1194 },
1195 },
1196 0x303 => { #6
1197 Name => 'AFSearch',
1198 Writable => 'int16u',
1199 PrintConv => {
1200 0 => 'Not Ready',
1201 1 => 'Ready',
1202 },
1203 },
1204 0x304 => { #PH/4
1205 Name => 'AFAreas',
1206 Format => 'int32u',
1207 Count => 64,
1208 PrintConv => 'Image::ExifTool::Olympus::PrintAFAreas($val)',
1209 },
1210 0x400 => { #6
1211 Name => 'FlashMode',
1212 Writable => 'int16u',
1213 PrintConv => {
1214 0 => 'Off',
1215 BITMASK => {
1216 0 => 'On',
1217 1 => 'Fill-in',
1218 2 => 'Red-eye',
1219 3 => 'Slow-sync',
1220 4 => 'Forced On',
1221 5 => '2nd Curtain',
1222 },
1223 },
1224 },
1225 0x401 => { #6
1226 Name => 'FlashExposureCompensation',
1227 Writable => 'rational64s',
1228 },
1229 0x500 => { #6
1230 Name => 'WhiteBalance2',
1231 Writable => 'int16u',
1232 PrintConv => {
1233 0 => 'Auto',
1234 16 => '7500K (Fine Weather with Shade)',
1235 17 => '6000K (Cloudy)',
1236 18 => '5300K (Fine Weather)',
1237 20 => '3000K (Tungsten light)',
1238 21 => '3600K (Tungsten light-like)',
1239 33 => '6600K (Daylight fluorescent)',
1240 34 => '4500K (Neutral white fluorescent)',
1241 35 => '4000K (Cool white fluorescent)',
1242 48 => '3600K (Tungsten light-like)',
1243 256 => 'Custom WB 1',
1244 257 => 'Custom WB 2',
1245 258 => 'Custom WB 3',
1246 259 => 'Custom WB 4',
1247 512 => 'Custom WB 5400K',
1248 513 => 'Custom WB 2900K',
1249 514 => 'Custom WB 8000K',
1250 },
1251 },
1252 0x501 => { #PH/4
1253 Name => 'WhiteBalanceTemperature',
1254 Writable => 'int16u',
1255 PrintConv => '$val ? $val : "Auto"',
1256 PrintConvInv => '$val=~/^\d+$/ ? $val : 0',
1257 },
1258 0x502 => { #PH/4
1259 Name => 'WhiteBalanceBracket',
1260 Writable => 'int16s',
1261 },
1262 0x503 => { #PH/4/6
1263 Name => 'CustomSaturation',
1264 Writable => 'int16s',
1265 Count => 3,
1266 Notes => '3 numbers: 1. CS Value, 2. Min, 3. Max',
1267 PrintConv => q{
1268 my ($a,$b,$c)=split ' ',$val;
1269 if ($self->{CameraModel} =~ /^E-1\b/) {
1270 $a-=$b; $c-=$b;
1271 return "CS$a (min CS0, max CS$c)";
1272 } else {
1273 return "$a (min $b, max $c)";
1274 }
1275 },
1276 },
1277 0x504 => { #PH/4
1278 Name => 'ModifiedSaturation',
1279 Writable => 'int16u',
1280 PrintConv => {
1281 0 => 'Off',
1282 1 => 'CM1 (Red Enhance)',
1283 2 => 'CM2 (Green Enhance)',
1284 3 => 'CM3 (Blue Enhance)',
1285 4 => 'CM4 (Skin Tones)',
1286 },
1287 },
1288 0x505 => { #PH/4
1289 Name => 'ContrastSetting',
1290 Writable => 'int16s',
1291 Count => 3,
1292 Notes => 'value, min, max',
1293 PrintConv => 'my @v=split " ",$val; "$v[0] (min $v[1], max $v[2])"',
1294 PrintConvInv => '$val=~tr/-0-9 //dc;$val',
1295 },
1296 0x506 => { #PH/4
1297 Name => 'SharpnessSetting',
1298 Writable => 'int16s',
1299 Count => 3,
1300 Notes => 'value, min, max',
1301 PrintConv => 'my @v=split " ",$val; "$v[0] (min $v[1], max $v[2])"',
1302 PrintConvInv => '$val=~tr/-0-9 //dc;$val',
1303 },
1304 0x507 => { #PH/4
1305 Name => 'ColorSpace',
1306 Writable => 'int16u',
1307 PrintConv => { #6
1308 0 => 'sRGB',
1309 1 => 'Adobe RGB',
1310 2 => 'Pro Photo RGB',
1311 },
1312 },
1313 0x509 => { #6
1314 Name => 'SceneMode',
1315 Writable => 'int16u',
1316 PrintConv => {
1317 0 => 'Standard',
1318 6 => 'Auto', #6
1319 7 => 'Sport',
1320 8 => 'Portrait',
1321 9 => 'Landscape+Portrait',
1322 10 => 'Landscape',
1323 11 => 'Night Scene',
1324 13 => 'Panorama', #6
1325 16 => 'Landscape+Portrait', #6
1326 17 => 'Night+Portrait',
1327 19 => 'Fireworks',
1328 20 => 'Sunset',
1329 22 => 'Macro',
1330 25 => 'Documents',
1331 26 => 'Museum',
1332 28 => 'Beach&Snow',
1333 30 => 'Candle',
1334 35 => 'Underwater Wide1', #6
1335 36 => 'Underwater Macro', #6
1336 39 => 'High Key',
1337 40 => 'Digital Image Stabilization', #6
1338 44 => 'Underwater Wide2', #6
1339 45 => 'Low Key', #6
1340 46 => 'Children', #6
1341 48 => 'Nature Macro', #6
1342 },
1343 },
1344 0x50a => { #PH/4/6
1345 Name => 'NoiseReduction',
1346 Writable => 'int16u',
1347 PrintConv => {
1348 0 => 'Off',
1349 1 => 'Noise Reduction',
1350 2 => 'Noise Filter',
1351 3 => 'Noise Reduction + Noise Filter',
1352 4 => 'Noise Filter (ISO Boost)', #6
1353 5 => 'Noise Reduction + Noise Filter (ISO Boost)', #6
1354 },
1355 },
1356 0x50b => { #6
1357 Name => 'DistortionCorrection',
1358 Writable => 'int16u',
1359 PrintConv => \%offOn,
1360 },
1361 0x50c => { #PH/4
1362 Name => 'ShadingCompensation',
1363 Writable => 'int16u',
1364 PrintConv => \%offOn,
1365 },
1366 0x50d => { #PH/4
1367 Name => 'CompressionFactor',
1368 Writable => 'rational64u',
1369 },
1370 0x50f => { #6
1371 Name => 'Gradation',
1372 Writable => 'int16s',
1373 Count => 3,
1374 PrintConv => {
1375 '-1 -1 1' => 'Low Key',
1376 '0 -1 1' => 'Normal',
1377 '1 -1 1' => 'High Key',
1378 },
1379 },
1380 0x520 => { #6
1381 Name => 'PictureMode',
1382 Writable => 'int16u',
1383 PrintConv => {
1384 1 => 'Vivid',
1385 2 => 'Natural',
1386 3 => 'Muted',
1387 256 => 'Monotone',
1388 512 => 'Sepia',
1389 },
1390 },
1391 0x521 => { #6
1392 Name => 'PictureModeSaturation',
1393 Writable => 'int16s',
1394 Count => 3,
1395 Notes => 'value, min, max',
1396 PrintConv => 'my @v=split " ",$val; "$v[0] (min $v[1], max $v[2])"',
1397 PrintConvInv => '$val=~tr/-0-9 //dc;$val',
1398 },
1399 0x522 => { #6
1400 Name => 'PictureModeHue',
1401 Writable => 'int16s',
1402 Unknown => 1, # (needs verification)
1403 },
1404 0x523 => { #6
1405 Name => 'PictureModeContrast',
1406 Writable => 'int16s',
1407 Count => 3,
1408 Notes => 'value, min, max',
1409 PrintConv => 'my @v=split " ",$val; "$v[0] (min $v[1], max $v[2])"',
1410 PrintConvInv => '$val=~tr/-0-9 //dc;$val',
1411 },
1412 0x524 => { #6
1413 Name => 'PictureModeSharpness',
1414 # verified as the Sharpness setting in the Picture Mode menu for the E-410
1415 Writable => 'int16s',
1416 Count => 3,
1417 Notes => 'value, min, max',
1418 PrintConv => 'my @v=split " ",$val; "$v[0] (min $v[1], max $v[2])"',
1419 PrintConvInv => '$val=~tr/-0-9 //dc;$val',
1420 },
1421 0x525 => { #6
1422 Name => 'PictureModeBWFilter',
1423 Writable => 'int16s',
1424 PrintConv => {
1425 0 => 'n/a',
1426 1 => 'Neutral',
1427 2 => 'Yellow',
1428 3 => 'Orange',
1429 4 => 'Red',
1430 5 => 'Green',
1431 },
1432 },
1433 0x526 => { #6
1434 Name => 'PictureModeTone',
1435 Writable => 'int16s',
1436 PrintConv => {
1437 0 => 'n/a',
1438 1 => 'Neutral',
1439 2 => 'Sepia',
1440 3 => 'Blue',
1441 4 => 'Purple',
1442 5 => 'Green',
1443 },
1444 },
1445 0x527 => { #12
1446 Name => 'NoiseFilter',
1447 Writable => 'int16s',
1448 Count => 3,
1449 PrintConv => {
1450 '-2 -2 1' => 'Off',
1451 '-1 -2 1' => 'Low',
1452 '0 -2 1' => 'Standard',
1453 '1 -2 1' => 'High',
1454 },
1455 },
1456 0x600 => { #PH/4
1457 Name => 'DriveMode',
1458 Writable => 'int16u',
1459 Count => -1,
1460 Notes => '2 or 3 numbers: 1. Mode, 2. Shot number, 3. Mode bits',
1461 PrintConv => q{
1462 my ($a,$b,$c) = split ' ',$val;
1463 return 'Single Shot' unless $a;
1464 if ($a == 5 and defined $c) {
1465 $a = DecodeBits($c, { #6
1466 0 => 'AE',
1467 1 => 'WB',
1468 2 => 'FL',
1469 3 => 'MF',
1470 }) . ' Bracketing';
1471 $a =~ s/, /+/g;
1472 } else {
1473 my %a = (
1474 1 => 'Continuous Shooting',
1475 2 => 'Exposure Bracketing',
1476 3 => 'White Balance Bracketing',
1477 4 => 'Exposure+WB Bracketing', #6
1478 );
1479 $a = $a{$a} || "Unknown ($a)";
1480 }
1481 return "$a, Shot $b";
1482 },
1483 },
1484 0x601 => { #6
1485 Name => 'PanoramaMode',
1486 Writable => 'int16u',
1487 Notes => '2 numbers: 1. Mode, 2. Shot number',
1488 PrintConv => q{
1489 my ($a,$b) = split ' ',$val;
1490 return 'Off' unless $a;
1491 my %a = (
1492 1 => 'Left to right',
1493 2 => 'Right to left',
1494 3 => 'Bottom to top',
1495 4 => 'Top to bottom',
1496 );
1497 return ($a{$a} || "Unknown ($a)") . ', Shot ' . $b;
1498 },
1499 },
1500 0x603 => { #PH/4
1501 Name => 'ImageQuality2',
1502 Writable => 'int16u',
1503 PrintConv => {
1504 1 => 'SQ',
1505 2 => 'HQ',
1506 3 => 'SHQ',
1507 4 => 'RAW',
1508 },
1509 },
1510 0x901 => { #PH (u770SW)
1511 # 2 numbers: 1st looks like meters above sea level, 2nd is usually 3x the 1st (feet?)
1512 Name => 'ManometerReading',
1513 Writable => 'int32s',
1514 Count => 2,
1515 },
1516);
1517
1518# Olympus RAW processing IFD (ref 6)
1519%Image::ExifTool::Olympus::RawDevelopment = (
1520 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
1521 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
1522 WRITABLE => 1,
1523 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1524 0x000 => { #PH
1525 Name => 'RawDevVersion',
1526 Writable => 'undef',
1527 Count => 4,
1528 },
1529 0x100 => {
1530 Name => 'RawDevExposureBiasValue',
1531 Writable => 'rational64s',
1532 },
1533 0x101 => {
1534 Name => 'RawDevWhiteBalanceValue',
1535 Writable => 'int16u',
1536 },
1537 0x102 => {
1538 Name => 'RawDevWBFineAdjustment',
1539 Writable => 'int16s',
1540 },
1541 0x103 => {
1542 Name => 'RawDevGrayPoint',
1543 Writable => 'int16u',
1544 Count => 3,
1545 },
1546 0x104 => {
1547 Name => 'RawDevSaturationEmphasis',
1548 Writable => 'int16s',
1549 Count => 3,
1550 },
1551 0x105 => {
1552 Name => 'RawDevMemoryColorEmphasis',
1553 Writable => 'int16u',
1554 },
1555 0x106 => {
1556 Name => 'RawDevContrastValue',
1557 Writable => 'int16s',
1558 Count => 3,
1559 },
1560 0x107 => {
1561 Name => 'RawDevSharpnessValue',
1562 Writable => 'int16s',
1563 Count => 3,
1564 },
1565 0x108 => {
1566 Name => 'RawDevColorSpace',
1567 Writable => 'int16u',
1568 PrintConv => { #11
1569 0 => 'sRGB',
1570 1 => 'Adobe RGB',
1571 2 => 'Pro Photo RGB',
1572 },
1573 },
1574 0x109 => {
1575 Name => 'RawDevEngine',
1576 Writable => 'int16u',
1577 PrintConv => { #11
1578 0 => 'High Speed',
1579 1 => 'High Function',
1580 2 => 'Advanced High Speed',
1581 3 => 'Advanced High Function',
1582 },
1583 },
1584 0x10a => {
1585 Name => 'RawDevNoiseReduction',
1586 Writable => 'int16u',
1587 PrintConv => { #11
1588 BITMASK => {
1589 0 => 'Noise Reduction',
1590 1 => 'Noise Filter',
1591 2 => 'ISO Boost',
1592 },
1593 },
1594 },
1595 0x10b => {
1596 Name => 'RawDevEditStatus',
1597 Writable => 'int16u',
1598 PrintConv => { #11
1599 0 => 'Original',
1600 1 => 'Edited (Landscape)',
1601 6 => 'Edited (Portrait)',
1602 8 => 'Edited (Portrait)',
1603 },
1604 },
1605 0x10c => {
1606 Name => 'RawDevSettings',
1607 Writable => 'int16u',
1608 PrintConv => { #11
1609 BITMASK => {
1610 0 => 'WB Color Temp',
1611 2 => 'WB Gray Point',
1612 3 => 'Saturation',
1613 4 => 'Contrast',
1614 5 => 'Sharpness',
1615 6 => 'Color Space',
1616 7 => 'High Function',
1617 8 => 'Noise Reduction',
1618 },
1619 },
1620 },
1621);
1622
1623# Olympus RAW processing B IFD (ref 11)
1624%Image::ExifTool::Olympus::RawDevelopment2 = (
1625 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
1626 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
1627 WRITABLE => 1,
1628 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1629 0x000 => {
1630 Name => 'RawDevVersion',
1631 Writable => 'undef',
1632 Count => 4,
1633 },
1634 0x100 => {
1635 Name => 'RawDevExposureBiasValue',
1636 Writable => 'rational64s',
1637 },
1638 0x101 => {
1639 Name => 'RawDevWhiteBalance',
1640 Writable => 'int16u',
1641 PrintConv => {
1642 1 => 'Color Temperature',
1643 2 => 'Gray Point',
1644 },
1645 },
1646 0x102 => {
1647 Name => 'RawDevWhiteBalanceValue',
1648 Writable => 'int16u',
1649 },
1650 0x103 => {
1651 Name => 'RawDevWBFineAdjustment',
1652 Writable => 'int16s',
1653 },
1654 0x104 => {
1655 Name => 'RawDevGrayPoint',
1656 Writable => 'int16u',
1657 Count => 3,
1658 },
1659 0x105 => {
1660 Name => 'RawDevContrastValue',
1661 Writable => 'int16s',
1662 Count => 3,
1663 },
1664 0x106 => {
1665 Name => 'RawDevSharpnessValue',
1666 Writable => 'int16s',
1667 Count => 3,
1668 },
1669 0x107 => {
1670 Name => 'RawDevSaturationEmphasis',
1671 Writable => 'int16s',
1672 Count => 3,
1673 },
1674 0x108 => {
1675 Name => 'RawDevMemoryColorEmphasis',
1676 Writable => 'int16u',
1677 },
1678 0x109 => {
1679 Name => 'RawDevColorSpace',
1680 Writable => 'int16u',
1681 PrintConv => {
1682 0 => 'sRGB',
1683 1 => 'Adobe RGB',
1684 2 => 'Pro Photo RGB',
1685 },
1686 },
1687 0x10a => {
1688 Name => 'RawDevNoiseReduction',
1689 Writable => 'int16u',
1690 PrintConv => {
1691 BITMASK => {
1692 0 => 'Noise Reduction',
1693 1 => 'Noise Filter',
1694 2 => 'ISO Boost',
1695 },
1696 },
1697 },
1698 0x10b => {
1699 Name => 'RawDevEngine',
1700 Writable => 'int16u',
1701 PrintConv => {
1702 0 => 'High Speed',
1703 1 => 'High Function',
1704 },
1705 },
1706 0x10c => {
1707 Name => 'RawDevPictureMode',
1708 Writable => 'int16u',
1709 PrintConv => {
1710 1 => 'Vivid',
1711 2 => 'Natural',
1712 3 => 'Muted',
1713 256 => 'Monotone',
1714 512 => 'Sepia',
1715 },
1716 },
1717 0x10d => {
1718 Name => 'RawDevPMSaturation',
1719 Writable => 'int16s',
1720 Count => 3,
1721 },
1722 0x10e => {
1723 Name => 'RawDevPMContrast',
1724 Writable => 'int16s',
1725 Count => 3,
1726 },
1727 0x10f => {
1728 Name => 'RawDevPMSharpness',
1729 Writable => 'int16s',
1730 Count => 3,
1731 },
1732 0x110 => {
1733 Name => 'RawDevPM_BWFilter',
1734 Writable => 'int16u',
1735 PrintConv => {
1736 1 => 'Neutral',
1737 2 => 'Yellow',
1738 3 => 'Orange',
1739 4 => 'Red',
1740 5 => 'Green',
1741 },
1742 },
1743 0x111 => {
1744 Name => 'RawDevPMPictureTone',
1745 Writable => 'int16u',
1746 PrintConv => {
1747 1 => 'Neutral',
1748 2 => 'Sepia',
1749 3 => 'Blue',
1750 4 => 'Purple',
1751 5 => 'Green',
1752 },
1753 },
1754 0x112 => {
1755 Name => 'RawDevGradation',
1756 Writable => 'int16s',
1757 Count => 3,
1758 },
1759);
1760
1761# Olympus Image processing IFD
1762%Image::ExifTool::Olympus::ImageProcessing = (
1763 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
1764 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
1765 WRITABLE => 1,
1766 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1767 0x000 => { #PH
1768 Name => 'ImageProcessingVersion',
1769 Writable => 'undef',
1770 Count => 4,
1771 },
1772 0x100 => { #6
1773 Name => 'WB_RBLevels',
1774 Writable => 'int16u',
1775 Count => 2,
1776 },
1777 0x200 => { #6
1778 Name => 'ColorMatrix',
1779 Writable => 'int16u',
1780 Format => 'int16s',
1781 Count => 9,
1782 },
1783 0x300 => { #PH/4
1784 Name => 'SmoothingParameter1',
1785 Writable => 'int16u',
1786 },
1787 0x310 => { #PH/4
1788 Name => 'SmoothingParameter2',
1789 Writable => 'int16u',
1790 },
1791 0x600 => { #PH/4
1792 Name => 'SmoothingThresholds',
1793 Writable => 'int16u',
1794 Count => 4,
1795 },
1796 0x610 => { #PH/4
1797 Name => 'SmoothingThreshold2',
1798 Writable => 'int16u',
1799 },
1800 0x611 => { #4/6
1801 Name => 'ValidBits',
1802 Writable => 'int16u',
1803 Count => 2,
1804 },
1805 0x614 => { #PH
1806 Name => 'OlympusImageWidth2',
1807 Writable => 'int32u',
1808 },
1809 0x615 => { #PH
1810 Name => 'OlympusImageHeight2',
1811 Writable => 'int32u',
1812 },
1813 # 0x1010-0x1012 are the processing options used in camera or in
1814 # Olympus software, which 0x050a-0x050c are in-camera only (ref 6)
1815 0x1010 => { #PH/4
1816 Name => 'NoiseReduction2',
1817 Writable => 'int16u',
1818 PrintConv => {
1819 0 => 'Off',
1820 1 => 'Noise Filter',
1821 2 => 'Noise Reduction',
1822 3 => 'Noise Reduction + Noise Filter', #6
1823 4 => 'Noise Filter (ISO Boost)', #6
1824 5 => 'Noise Reduction + Noise Filter (ISO Boost)', #6
1825 },
1826 },
1827 0x1011 => { #6
1828 Name => 'DistortionCorrection2',
1829 Writable => 'int16u',
1830 PrintConv => {
1831 0 => 'Off',
1832 1 => 'On',
1833 },
1834 },
1835 0x1012 => { #PH/4
1836 Name => 'ShadingCompensation2',
1837 Writable => 'int16u',
1838 PrintConv => \%offOn,
1839 },
1840 0x1103 => { #PH
1841 Name => 'UnknownBlock',
1842 Writable => 'undef',
1843 Notes => 'unknown 142kB block in ORF images, not copied to JPEG images',
1844 # 'Drop' because too large for APP1 in JPEG images
1845 Flags => [ 'Unknown', 'Binary', 'Drop' ],
1846 },
1847);
1848
1849# Olympus Focus Info IFD
1850%Image::ExifTool::Olympus::FocusInfo = (
1851 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
1852 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
1853 WRITABLE => 1,
1854 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1855 0x000 => { #PH
1856 Name => 'FocusInfoVersion',
1857 Writable => 'undef',
1858 Count => 4,
1859 },
1860 0x209 => { #PH/4
1861 Name => 'AutoFocus',
1862 Writable => 'int16u',
1863 PrintConv => \%offOn,
1864 Unknown => 1, #6
1865 },
1866 0x300 => { #6
1867 Name => 'ZoomStepCount',
1868 Writable => 'int16u',
1869 },
1870 0x301 => { #11
1871 Name => 'FocusStepCount',
1872 Writable => 'int16u',
1873 },
1874 0x305 => { #4
1875 Name => 'FocusDistance',
1876 Writable => 'rational64u',
1877 # this rational value looks like it is in mm when the denominator is
1878 # 1 (E-1), and cm when denominator is 10 (E-300), so if we ignore the
1879 # denominator we are consistently in mm - PH
1880 Format => 'int32u',
1881 Count => 2,
1882 ValueConv => q{
1883 my ($a,$b) = split ' ',$val;
1884 return 0 if $a == 0xffffffff;
1885 return $a / 1000;
1886 },
1887 ValueConvInv => q{
1888 return '4294967295 1' unless $val;
1889 $val = int($val * 1000 + 0.5);
1890 return "$val 1";
1891 },
1892 PrintConv => '$val ? "$val m" : "inf"',
1893 PrintConvInv => '$val eq "inf" ? 0 : $val=~s/\s*m$//, $val',
1894 },
1895 0x308 => { #11
1896 Name => 'AFPoint',
1897 Writable => 'int16u',
1898 PrintConv => {
1899 0 => 'Left',
1900 1 => 'Center (1)',
1901 2 => 'Right',
1902 3 => 'Center (3)',
1903 255 => 'None',
1904 },
1905 },
1906 # 0x31a Continuous AF parameters?
1907 # 0x1200-0x1209 Flash information:
1908 0x1201 => { #6
1909 Name => 'ExternalFlash',
1910 Writable => 'int16u',
1911 Count => 2,
1912 PrintConv => {
1913 '0 0' => 'Off',
1914 '1 0' => 'On',
1915 },
1916 },
1917 0x1203 => { #11
1918 Name => 'ExternalFlashGuideNumber',
1919 Writable => 'rational64s',
1920 Unknown => 1, # (needs verification)
1921 },
1922 0x1204 => { #11(reversed)/7
1923 Name => 'ExternalFlashBounce',
1924 Writable => 'int16u',
1925 PrintConv => {
1926 0 => 'Bounce or Off',
1927 1 => 'Direct',
1928 },
1929 },
1930 0x1205 => { #11 (ref converts to mm using table)
1931 Name => 'ExternalFlashZoom',
1932 Writable => 'rational64u',
1933 },
1934 0x1208 => { #6
1935 Name => 'InternalFlash',
1936 Writable => 'int16u',
1937 Count => -1,
1938 PrintConv => {
1939 '0' => 'Off',
1940 '1' => 'On',
1941 '0 0' => 'Off',
1942 '1 0' => 'On',
1943 },
1944 },
1945 0x1209 => { #6
1946 Name => 'ManualFlash',
1947 Writable => 'int16u',
1948 Count => 2,
1949 Notes => '2 numbers: 1. 0=Off, 1=On, 2. Flash strength',
1950 PrintConv => q{
1951 my ($a,$b) = split ' ',$val;
1952 return 'Off' unless $a;
1953 $b = ($b == 1) ? 'Full' : "1/$b";
1954 return "On ($b strength)";
1955 },
1956 },
1957 0x1500 => { #6
1958 Name => 'SensorTemperature',
1959 Writable => 'int16s',
1960 },
1961 0x1600 => { # ref http://fourthirdsphoto.com/vbb/showpost.php?p=107607&postcount=15
1962 Name => 'ImageStabilization',
1963 Writable => 'undef',
1964 # if the first 4 bytes are non-zero, then bit 0x01 of byte 44
1965 # gives the stabilization mode
1966 PrintConv => q{
1967 $val =~ /^\0{4}/ ? 'Off' : 'On, ' .
1968 (unpack('x44C',$val) & 0x01 ? 'Mode 1' : 'Mode 2')
1969 },
1970 },
1971 # 0x102a same as Subdir4-0x300
1972);
1973
1974# Olympus raw information tags (ref 6)
1975%Image::ExifTool::Olympus::RawInfo = (
1976 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
1977 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
1978 NOTES => 'These tags are found only in ORF images of some models (ie. C8080WZ).',
1979 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1980 0x000 => {
1981 Name => 'RawInfoVersion',
1982 Writable => 'undef',
1983 Count => 4,
1984 },
1985 0x100 => {
1986 Name => 'WB_RBLevelsUsed',
1987 Writable => 'int16',
1988 Count => 2,
1989 },
1990 0x110 => {
1991 Name => 'WB_RBLevelsAuto',
1992 Writable => 'int16',
1993 Count => 2,
1994 },
1995 0x120 => {
1996 Name => 'WB_RBLevelsShade',
1997 Writable => 'int16',
1998 Count => 2,
1999 },
2000 0x121 => {
2001 Name => 'WB_RBLevelsCloudy',
2002 Writable => 'int16',
2003 Count => 2,
2004 },
2005 0x122 => {
2006 Name => 'WB_RBLevelsFineWeather',
2007 Writable => 'int16',
2008 Count => 2,
2009 },
2010 0x123 => {
2011 Name => 'WB_RBLevelsTungsten',
2012 Writable => 'int16',
2013 Count => 2,
2014 },
2015 0x124 => {
2016 Name => 'WB_RBLevelsEveningSunlight',
2017 Writable => 'int16',
2018 Count => 2,
2019 },
2020 0x130 => {
2021 Name => 'WB_RBLevelsDaylightFluor',
2022 Writable => 'int16',
2023 Count => 2,
2024 },
2025 0x131 => {
2026 Name => 'WB_RBLevelsDayWhiteFluor',
2027 Writable => 'int16',
2028 Count => 2,
2029 },
2030 0x132 => {
2031 Name => 'WB_RBLevelsCoolWhiteFluor',
2032 Writable => 'int16',
2033 Count => 2,
2034 },
2035 0x133 => {
2036 Name => 'WB_RBLevelsWhiteFluorescent',
2037 Writable => 'int16',
2038 Count => 2,
2039 },
2040 0x200 => {
2041 Name => 'ColorMatrix2',
2042 Format => 'int16s',
2043 Writable => 'int16u',
2044 Count => 9,
2045 },
2046 # 0x240 => 'ColorMatrixDefault', ?
2047 # 0x250 => 'ColorMatrixSaturation', ?
2048 # 0x251 => 'ColorMatrixHue', ?
2049 # 0x252 => 'ColorMatrixContrast', ?
2050 # 0x300 => sharpness-related
2051 # 0x301 => list of sharpness-related values
2052 0x310 => {
2053 Name => 'CoringFilter',
2054 Writable => 'int16u',
2055 },
2056 0x311 => {
2057 Name => 'CoringValues',
2058 Writable => 'int16u',
2059 Count => 11,
2060 },
2061 0x600 => {
2062 Name => 'BlackLevel2',
2063 Writable => 'int16u',
2064 Count => 4,
2065 },
2066 0x601 => {
2067 Name => 'YCbCrCoefficients',
2068 Notes => 'stored as int16u[6], but extracted as rational32u[3]',
2069 Format => 'rational32u',
2070 },
2071 0x611 => {
2072 Name => 'ValidPixelDepth',
2073 Writable => 'int16u',
2074 Count => 2,
2075 },
2076 0x612 => { #11
2077 Name => 'StartOffsetX',
2078 Writable => 'int16u',
2079 },
2080 0x613 => { #11
2081 Name => 'StartOffsetY',
2082 Writable => 'int16u',
2083 },
2084 0x614 => {
2085 Name => 'FinalImageWidth',
2086 Writable => 'int32u',
2087 },
2088 0x615 => {
2089 Name => 'FinalImageHeight',
2090 Writable => 'int32u',
2091 },
2092 0x1000 => {
2093 Name => 'LightSource',
2094 Writable => 'int16u',
2095 PrintConv => {
2096 0 => 'Unknown',
2097 16 => 'Shade',
2098 17 => 'Cloudy',
2099 18 => 'Fine Weather',
2100 20 => 'Tungsten (incandescent)',
2101 22 => 'Evening Sunlight',
2102 33 => 'Daylight Fluorescent (D 5700 - 7100K)',
2103 34 => 'Day White Fluorescent (N 4600 - 5400K)',
2104 35 => 'Cool White Fluorescent (W 3900 - 4500K)',
2105 36 => 'White Fluorescent (WW 3200 - 3700K)',
2106 256 => 'One Touch White Balance',
2107 512 => 'Custom 1-4',
2108 },
2109 },
2110 # the following 5 tags all have 3 values: val, min, max
2111 0x1001 => {
2112 Name => 'WhiteBalanceComp',
2113 Writable => 'int16s',
2114 Count => 3,
2115 },
2116 0x1010 => {
2117 Name => 'SaturationSetting',
2118 Writable => 'int16s',
2119 Count => 3,
2120 },
2121 0x1011 => {
2122 Name => 'HueSetting',
2123 Writable => 'int16s',
2124 Count => 3,
2125 },
2126 0x1012 => {
2127 Name => 'ContrastSetting',
2128 Writable => 'int16s',
2129 Count => 3,
2130 },
2131 0x1013 => {
2132 Name => 'SharpnessSetting',
2133 Writable => 'int16s',
2134 Count => 3,
2135 },
2136 # settings written by Camedia Master 4.x
2137 0x2000 => {
2138 Name => 'CMExposureCompensation',
2139 Writable => 'rational64s',
2140 },
2141 0x2001 => {
2142 Name => 'CMWhiteBalance',
2143 Writable => 'int16u',
2144 },
2145 0x2002 => {
2146 Name => 'CMWhiteBalanceComp',
2147 Writable => 'int16s',
2148 },
2149 0x2010 => {
2150 Name => 'CMWhiteBalanceGrayPoint',
2151 Writable => 'int16u',
2152 Count => 3,
2153 },
2154 0x2020 => {
2155 Name => 'CMSaturation',
2156 Writable => 'int16s',
2157 Count => 3,
2158 },
2159 0x2021 => {
2160 Name => 'CMHue',
2161 Writable => 'int16s',
2162 Count => 3,
2163 },
2164 0x2022 => {
2165 Name => 'CMContrast',
2166 Writable => 'int16s',
2167 Count => 3,
2168 },
2169 0x2023 => {
2170 Name => 'CMSharpness',
2171 Writable => 'int16s',
2172 Count => 3,
2173 },
2174);
2175
2176# Tags found only in some FE models
2177%Image::ExifTool::Olympus::FETags = (
2178 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
2179 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
2180 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
2181 NOTES => q{
2182 Some FE models write a large number of tags here, but most of this
2183 information remains unknown.
2184 },
2185 0x0100 => {
2186 Name => 'BodyFirmwareVersion',
2187 Writable => 'string',
2188 },
2189);
2190
2191# Olympus composite tags
2192%Image::ExifTool::Olympus::Composite = (
2193 GROUPS => { 2 => 'Camera' },
2194 ExtenderStatus => {
2195 Notes => q{
2196 Olympus cameras have the quirk that they may retain the extender settings
2197 after the extender is removed until the camera is powered off. This tag is
2198 an attempt to represent the actual status of the extender.
2199 },
2200 Require => {
2201 0 => 'Olympus:Extender',
2202 1 => 'Olympus:LensType',
2203 2 => 'MaxApertureValue',
2204 },
2205 ValueConv => 'Image::ExifTool::Olympus::ExtenderStatus($val[0],$prt[1],$val[2])',
2206 PrintConv => {
2207 0 => 'Not attached',
2208 1 => 'Attached',
2209 2 => 'Removed',
2210 },
2211 },
2212);
2213
2214# add our composite tags
2215Image::ExifTool::AddCompositeTags('Image::ExifTool::Olympus');
2216
2217
2218#------------------------------------------------------------------------------
2219# Determine if the extender (EX-25/EC-14) was really attached (ref 9)
2220# Inputs: 0) Extender, 1) LensType string, 2) MaxApertureAtMaxFocal
2221# Returns: 0=not attached, 1=attached, 2=could have been removed
2222# Notes: Olympus has a bug in the in-camera firmware which results in the
2223# extender information being cached and written into the EXIF data even after
2224# the extender has been removed. You must power cycle the camera to prevent it
2225# from writing the cached extender information into the EXIF data.
2226sub ExtenderStatus($$$)
2227{
2228 my ($extender, $lensType, $maxAperture) = @_;
2229 my @info = split ' ', $extender;
2230 # validate that extender identifier is reasonable
2231 return 0 unless @info >= 4 and $info[2];
2232 # if it's not an EC-14 (id 0 4) then assume it was really attached
2233 # (other extenders don't seem to affect the reported max aperture)
2234 return 1 if "$info[0] $info[2]" ne "0 4";
2235 # get the maximum aperture for this lens (in $1)
2236 $lensType =~ / F(\d+(.\d+)?)/ or return 1;
2237 # If the maximum aperture at the maximum focal length is greater than the
2238 # known max/max aperture of the lens, then the extender must be attached
2239 return ($maxAperture - $1 > 0.2) ? 1 : 2;
2240}
2241
2242#------------------------------------------------------------------------------
2243# Print lens information (ref 6)
2244# Inputs: 0) Lens info (string of integers: Make, Unknown, Model, Release, ...)
2245# 1) 'Lens' or 'Extender'
2246sub PrintLensInfo($$)
2247{
2248 my ($val, $type) = @_;
2249 my @info = split ' ', $val;
2250 return "Unknown ($val)" unless @info >= 4;
2251 return 'None' unless $info[2];
2252 my %make = (
2253 0 => 'Olympus',
2254 1 => 'Sigma',
2255 2 => 'Leica',
2256 3 => 'Leica',
2257 );
2258 my %model = (
2259 Lens => {
2260 # Olympus lenses (key is "make model" with optional "release")
2261 '0 1 0' => 'Zuiko Digital ED 50mm F2.0 Macro',
2262 '0 1 1' => 'Zuiko Digital 40-150mm F3.5-4.5', #8
2263 '0 2' => 'Zuiko Digital ED 150mm F2.0',
2264 '0 3' => 'Zuiko Digital ED 300mm F2.8',
2265 '0 5 0' => 'Zuiko Digital 14-54mm F2.8-3.5',
2266 '0 5 1' => 'Zuiko Digital Pro ED 90-250mm F2.8', #9
2267 '0 6 0' => 'Zuiko Digital ED 50-200mm F2.8-3.5',
2268 '0 6 1' => 'Zuiko Digital ED 8mm F3.5 Fisheye', #9
2269 '0 7 0' => 'Zuiko Digital 11-22mm F2.8-3.5',
2270 '0 7 1' => 'Zuiko Digital 18-180mm F3.5-6.3', #6
2271 '0 21' => 'Zuiko Digital ED 7-14mm F4.0',
2272 '0 23' => 'Zuiko Digital Pro ED 35-100mm F2.0', #7
2273 '0 24' => 'Zuiko Digital 14-45mm F3.5-5.6',
2274 '0 32' => 'Zuiko Digital 35mm F3.5 Macro', #9
2275 '0 34' => 'Zuiko Digital 17.5-45mm F3.5-5.6', #9
2276 '0 35' => 'Zuiko Digital ED 14-42mm F3.5-5.6', #PH
2277 '0 36' => 'Zuiko Digital ED 40-150mm F4.0-5.6', #PH
2278 # Sigma lenses
2279 '1 1' => '18-50mm F3.5-5.6', #8
2280 '1 2' => '55-200mm F4.0-5.6 DC',
2281 '1 3' => '18-125mm F3.5-5.6 DC',
2282 '1 4' => '18-125mm F3.5-5.6', #7
2283 '1 5' => '30mm F1.4', #10
2284 '1 7' => '105mm F2.8 DG', #PH
2285 '1 8' => '150mm F2.8 DG HSM', #PH
2286 '1 17' => '135-400mm F4.5-5.6 DG ASP APO RF', #11
2287 '1 18' => '300-800mm F5.6 EX DG APO', #11
2288 # Leica lenses (ref 11)
2289 '2 1' => 'D Vario Elmarit 14-50mm, F2.8-3.5 Asph.',
2290 '2 2' => 'D Summilux 25mm, F1.4 Asph.',
2291 '3 1' => 'D Vario Elmarit 14-50mm, F2.8-3.5 Asph.',
2292 '3 2' => 'D Summilux 25mm, F1.4 Asph.',
2293 },
2294 Extender => {
2295 # Olympus extenders
2296 '0 4' => 'Zuiko Digital EC-14 1.4x Teleconverter',
2297 '0 8' => 'EX-25 Extension Tube',
2298 },
2299 );
2300 my %release = (
2301 0 => '', # production
2302 1 => ' (pre-release)',
2303 );
2304 my $make = $make{$info[0]} || "Unknown Make ($info[0])";
2305 my $str = "$info[0] $info[2]";
2306 my $rel = $release{$info[3]};
2307 my $model = $model{$type}->{"$str $info[3]"};
2308 if ($model) {
2309 $rel = ''; # don't print release if it is used to differentiate models
2310 } else {
2311 $rel = " Unknown Release ($info[3])" unless defined $rel;
2312 $model = $model{$type}->{$str} || "Unknown Model ($str)";
2313 }
2314 return "$make $model$rel";
2315}
2316
2317#------------------------------------------------------------------------------
2318# Print AF points
2319# Inputs: 0) AF point data (string of integers)
2320# Notes: I'm just guessing that the 2nd and 4th bytes are the Y coordinates,
2321# and that more AF points will show up in the future (derived from E-1 images,
2322# and the E-1 uses just one of 3 possible AF points, all centered in Y) - PH
2323sub PrintAFAreas($)
2324{
2325 my $val = shift;
2326 my @points = split ' ', $val;
2327 my %afPointNames = (
2328 0x36794285 => 'Left',
2329 0x79798585 => 'Center',
2330 0xBD79C985 => 'Right',
2331 );
2332 $val = '';
2333 my $pt;
2334 foreach $pt (@points) {
2335 next unless $pt;
2336 $val and $val .= ', ';
2337 $afPointNames{$pt} and $val .= $afPointNames{$pt} . ' ';
2338 my @coords = unpack('C4',pack('N',$pt));
2339 $val .= "($coords[0],$coords[1])-($coords[2],$coords[3])";
2340 }
2341 $val or $val = 'none';
2342 return $val;
2343}
2344
2345#------------------------------------------------------------------------------
2346# Process ORF file
2347# Inputs: 0) ExifTool object reference, 1) directory information reference
2348# Returns: 1 if this looked like a valid ORF file, 0 otherwise
2349sub ProcessORF($$)
2350{
2351 my ($exifTool, $dirInfo) = @_;
2352 return $exifTool->ProcessTIFF($dirInfo);
2353}
2354
23551; # end
2356
2357__END__
2358
2359=head1 NAME
2360
2361Image::ExifTool::Olympus - Olympus/Epson maker notes tags
2362
2363=head1 SYNOPSIS
2364
2365This module is loaded automatically by Image::ExifTool when required.
2366
2367=head1 DESCRIPTION
2368
2369This module contains definitions required by Image::ExifTool to interpret
2370Olympus or Epson maker notes in EXIF information.
2371
2372=head1 AUTHOR
2373
2374Copyright 2003-2007, Phil Harvey (phil at owl.phy.queensu.ca)
2375
2376This library is free software; you can redistribute it and/or modify it
2377under the same terms as Perl itself.
2378
2379=head1 REFERENCES
2380
2381=over 4
2382
2383=item L<http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html>
2384
2385=item L<http://www.cybercom.net/~dcoffin/dcraw/>
2386
2387=item L<http://www.ozhiker.com/electronics/pjmt/jpeg_info/olympus_mn.html>
2388
2389=item L<http://olypedia.de/Olympus_Makernotes>
2390
2391=back
2392
2393=head1 ACKNOWLEDGEMENTS
2394
2395Thanks to Markku Hanninen, Remi Guyomarch, Frank Ledwon, Michael Meissner,
2396Mark Dapoz and Ioannis Panagiotopoulos for their help figuring out some
2397Olympus tags, and Lilo Huang for adding to the LensType list.
2398
2399=head1 SEE ALSO
2400
2401L<Image::ExifTool::TagNames/Olympus Tags>,
2402L<Image::ExifTool(3pm)|Image::ExifTool>
2403
2404=cut
Note: See TracBrowser for help on using the repository browser.