source: main/trunk/greenstone2/perllib/cpan/Image/ExifTool/Casio.pm@ 24107

Last change on this file since 24107 was 24107, checked in by sjm84, 13 years ago

Updating the ExifTool perl modules

File size: 30.0 KB
Line 
1#------------------------------------------------------------------------------
2# File: Casio.pm
3#
4# Description: Casio EXIF maker notes tags
5#
6# Revisions: 12/09/2003 - P. Harvey Created
7# 09/10/2004 - P. Harvey Added MakerNote2 (thanks to Joachim Loehr)
8#
9# References: 1) http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html
10# 2) Joachim Loehr private communication
11# 3) http://homepage3.nifty.com/kamisaka/makernote/makernote_casio.htm
12# 4) http://www.gvsoft.homedns.org/exif/makernote-casio.html
13# 5) Robert Chi private communication (EX-F1)
14# JD) Jens Duttke private communication
15#------------------------------------------------------------------------------
16
17package Image::ExifTool::Casio;
18
19use strict;
20use vars qw($VERSION);
21use Image::ExifTool::Exif;
22
23$VERSION = '1.32';
24
25# older Casio maker notes (ref 1)
26%Image::ExifTool::Casio::Main = (
27 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
28 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
29 WRITABLE => 1,
30 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
31 0x0001 => {
32 Name => 'RecordingMode' ,
33 Writable => 'int16u',
34 PrintConv => {
35 1 => 'Single Shutter',
36 2 => 'Panorama',
37 3 => 'Night Scene',
38 4 => 'Portrait',
39 5 => 'Landscape',
40 7 => 'Panorama', #4
41 10 => 'Night Scene', #4
42 15 => 'Portrait', #4
43 16 => 'Landscape', #4
44 },
45 },
46 0x0002 => {
47 Name => 'Quality',
48 Writable => 'int16u',
49 PrintConv => { 1 => 'Economy', 2 => 'Normal', 3 => 'Fine' },
50 },
51 0x0003 => {
52 Name => 'FocusMode',
53 Writable => 'int16u',
54 PrintConv => {
55 2 => 'Macro',
56 3 => 'Auto',
57 4 => 'Manual',
58 5 => 'Infinity',
59 7 => 'Spot AF', #4
60 },
61 },
62 0x0004 => [
63 {
64 Name => 'FlashMode',
65 Condition => '$self->{Model} =~ /^QV-(3500EX|8000SX)/',
66 Writable => 'int16u',
67 PrintConv => {
68 1 => 'Auto',
69 2 => 'On',
70 3 => 'Off',
71 4 => 'Off', #4
72 5 => 'Red-eye Reduction', #4
73 },
74 },
75 {
76 Name => 'FlashMode',
77 Writable => 'int16u',
78 PrintConv => {
79 1 => 'Auto',
80 2 => 'On',
81 3 => 'Off',
82 4 => 'Red-eye Reduction',
83 },
84 },
85 ],
86 0x0005 => {
87 Name => 'FlashIntensity',
88 Writable => 'int16u',
89 PrintConv => {
90 11 => 'Weak',
91 12 => 'Low', #4
92 13 => 'Normal',
93 14 => 'High', #4
94 15 => 'Strong',
95 },
96 },
97 0x0006 => {
98 Name => 'ObjectDistance',
99 Writable => 'int32u',
100 ValueConv => '$val / 1000', #4
101 ValueConvInv => '$val * 1000',
102 PrintConv => '"$val m"',
103 PrintConvInv => '$val=~s/\s*m$//;$val',
104 },
105 0x0007 => {
106 Name => 'WhiteBalance',
107 Writable => 'int16u',
108 PrintConv => {
109 1 => 'Auto',
110 2 => 'Tungsten',
111 3 => 'Daylight',
112 4 => 'Fluorescent',
113 5 => 'Shade',
114 129 => 'Manual',
115 },
116 },
117 # 0x0009 Bulb? (ref unknown)
118 0x000a => {
119 Name => 'DigitalZoom',
120 Writable => 'int32u',
121 PrintHex => 1,
122 PrintConv => {
123 0x10000 => 'Off',
124 0x10001 => '2x',
125 0x19999 => '1.6x', #4
126 0x20000 => '2x', #4
127 0x33333 => '3.2x', #4
128 0x40000 => '4x', #4
129 },
130 },
131 0x000b => {
132 Name => 'Sharpness',
133 Writable => 'int16u',
134 PrintConv => {
135 0 => 'Normal',
136 1 => 'Soft',
137 2 => 'Hard',
138 16 => 'Normal', #4
139 17 => '+1', #4
140 18 => '-1', #4
141 },
142 },
143 0x000c => {
144 Name => 'Contrast',
145 Writable => 'int16u',
146 PrintConv => {
147 0 => 'Normal',
148 1 => 'Low',
149 2 => 'High',
150 16 => 'Normal', #4
151 17 => '+1', #4
152 18 => '-1', #4
153 },
154 },
155 0x000d => {
156 Name => 'Saturation',
157 Writable => 'int16u',
158 PrintConv => {
159 0 => 'Normal',
160 1 => 'Low',
161 2 => 'High',
162 16 => 'Normal', #4
163 17 => '+1', #4
164 18 => '-1', #4
165 },
166 },
167 0x0014 => {
168 Name => 'ISO',
169 Writable => 'int16u',
170 Priority => 0,
171 },
172 0x0015 => { #JD (Similar to Type2 0x2001)
173 Name => 'FirmwareDate',
174 Writable => 'string',
175 Format => 'undef', # the 'string' contains nulls
176 Count => 18,
177 PrintConv => q{
178 $_ = $val;
179 if (/^(\d{2})(\d{2})\0\0(\d{2})(\d{2})\0\0(\d{2})(.{2})\0{2}$/) {
180 my $yr = $1 + ($1 < 70 ? 2000 : 1900);
181 my $sec = $6;
182 $val = "$yr:$2:$3 $4:$5";
183 $val .= ":$sec" if $sec=~/^\d{2}$/;
184 return $val;
185 }
186 tr/\0/./; s/\.+$//;
187 return "Unknown ($_)";
188 },
189 PrintConvInv => q{
190 $_ = $val;
191 if (/^(19|20)(\d{2}):(\d{2}):(\d{2}) (\d{2}):(\d{2})$/) {
192 return "$2$3\0\0$4$5\0\0$6\0\0\0\0";
193 } elsif (/^Unknown\s*\((.*)\)$/i) {
194 $_ = $1; tr/./\0/;
195 return $_;
196 } else {
197 return undef;
198 }
199 },
200 },
201 0x0016 => { #4
202 Name => 'Enhancement',
203 Writable => 'int16u',
204 PrintConv => {
205 1 => 'Off',
206 2 => 'Red',
207 3 => 'Green',
208 4 => 'Blue',
209 5 => 'Flesh Tones',
210 },
211 },
212 0x0017 => { #4
213 Name => 'ColorFilter',
214 Writable => 'int16u',
215 PrintConv => {
216 1 => 'Off',
217 2 => 'Black & White',
218 3 => 'Sepia',
219 4 => 'Red',
220 5 => 'Green',
221 6 => 'Blue',
222 7 => 'Yellow',
223 8 => 'Pink',
224 9 => 'Purple',
225 },
226 },
227 0x0018 => { #4
228 Name => 'AFPoint',
229 Writable => 'int16u',
230 Notes => 'may not be valid for all models', #JD
231 PrintConv => {
232 1 => 'Center',
233 2 => 'Upper Left',
234 3 => 'Upper Right',
235 4 => 'Near Left/Right of Center',
236 5 => 'Far Left/Right of Center',
237 6 => 'Far Left/Right of Center/Bottom',
238 7 => 'Top Near-Left',
239 8 => 'Near Upper/Left',
240 9 => 'Top Near-Right',
241 10 => 'Top Left',
242 11 => 'Top Center',
243 12 => 'Top Right',
244 13 => 'Center Left',
245 14 => 'Center Right',
246 15 => 'Bottom Left',
247 16 => 'Bottom Center',
248 17 => 'Bottom Right',
249 },
250 },
251 0x0019 => { #4
252 Name => 'FlashIntensity',
253 Writable => 'int16u',
254 PrintConv => {
255 1 => 'Normal',
256 2 => 'Weak',
257 3 => 'Strong',
258 },
259 },
260 0x0e00 => {
261 Name => 'PrintIM',
262 Description => 'Print Image Matching',
263 # crazy I know, but the offset for this value is entry-based
264 # (QV-2100, QV-2900UX, QV-3500EX and QV-4000) even though the
265 # offsets for other values isn't
266 EntryBased => 1,
267 SubDirectory => {
268 TagTable => 'Image::ExifTool::PrintIM::Main',
269 },
270 },
271);
272
273# ref 2:
274%Image::ExifTool::Casio::Type2 = (
275 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
276 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
277 WRITABLE => 1,
278 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
279 0x0002 => {
280 Name => 'PreviewImageSize',
281 Groups => { 2 => 'Image' },
282 Writable => 'int16u',
283 Count => 2,
284 PrintConv => '$val =~ tr/ /x/; $val',
285 PrintConvInv => '$val =~ tr/x/ /; $val',
286 },
287 0x0003 => {
288 Name => 'PreviewImageLength',
289 Groups => { 2 => 'Image' },
290 OffsetPair => 0x0004, # point to associated offset
291 DataTag => 'PreviewImage',
292 Writable => 'int32u',
293 Protected => 2,
294 },
295 0x0004 => {
296 Name => 'PreviewImageStart',
297 Groups => { 2 => 'Image' },
298 Flags => 'IsOffset',
299 OffsetPair => 0x0003, # point to associated byte count
300 DataTag => 'PreviewImage',
301 Writable => 'int32u',
302 Protected => 2,
303 },
304 0x0008 => {
305 Name => 'QualityMode',
306 Writable => 'int16u',
307 PrintConv => {
308 0 => 'Economy',
309 1 => 'Normal',
310 2 => 'Fine',
311 },
312 },
313 0x0009 => {
314 Name => 'CasioImageSize',
315 Groups => { 2 => 'Image' },
316 Writable => 'int16u',
317 PrintConv => {
318 0 => '640x480',
319 4 => '1600x1200',
320 5 => '2048x1536',
321 20 => '2288x1712',
322 21 => '2592x1944',
323 22 => '2304x1728',
324 36 => '3008x2008',
325 },
326 },
327 0x000d => {
328 Name => 'FocusMode',
329 Writable => 'int16u',
330 PrintConv => {
331 0 => 'Normal',
332 1 => 'Macro',
333 },
334 },
335 0x0014 => {
336 Name => 'ISO',
337 Writable => 'int16u',
338 Priority => 0,
339 PrintConv => {
340 3 => 50,
341 4 => 64,
342 6 => 100,
343 9 => 200,
344 },
345 },
346 0x0019 => {
347 Name => 'WhiteBalance',
348 Writable => 'int16u',
349 PrintConv => {
350 0 => 'Auto',
351 1 => 'Daylight',
352 2 => 'Shade',
353 3 => 'Tungsten',
354 4 => 'Fluorescent',
355 5 => 'Manual',
356 },
357 },
358 0x001d => {
359 Name => 'FocalLength',
360 Writable => 'rational64u',
361 PrintConv => 'sprintf("%.1f mm",$val)',
362 PrintConvInv => '$val=~s/\s*mm$//;$val',
363 },
364 0x001f => {
365 Name => 'Saturation',
366 Writable => 'int16u',
367 PrintConv => {
368 0 => 'Low',
369 1 => 'Normal',
370 2 => 'High',
371 },
372 },
373 0x0020 => {
374 Name => 'Contrast',
375 Writable => 'int16u',
376 PrintConv => {
377 0 => 'Low',
378 1 => 'Normal',
379 2 => 'High',
380 },
381 },
382 0x0021 => {
383 Name => 'Sharpness',
384 Writable => 'int16u',
385 PrintConv => {
386 0 => 'Soft',
387 1 => 'Normal',
388 2 => 'Hard',
389 },
390 },
391 0x0e00 => {
392 Name => 'PrintIM',
393 Description => 'Print Image Matching',
394 Writable => 0,
395 SubDirectory => {
396 TagTable => 'Image::ExifTool::PrintIM::Main',
397 },
398 },
399 0x2000 => {
400 # this image data is also referenced by tags 3 and 4
401 # (nasty that they double-reference the image!)
402 %Image::ExifTool::previewImageTagInfo,
403 },
404 0x2001 => { #PH
405 # I downloaded images from 12 different EX-Z50 cameras, and they showed
406 # only 3 distinct dates here (2004:08:31 18:55, 2004:09:13 14:14, and
407 # 2004:11:26 17:07), so I'm guessing this is a firmware version date - PH
408 Name => 'FirmwareDate',
409 Writable => 'string',
410 Format => 'undef', # the 'string' contains nulls
411 Count => 18,
412 PrintConv => q{
413 $_ = $val;
414 if (/^(\d{2})(\d{2})\0\0(\d{2})(\d{2})\0\0(\d{2})\0{4}$/) {
415 my $yr = $1 + ($1 < 70 ? 2000 : 1900);
416 return "$yr:$2:$3 $4:$5";
417 }
418 tr/\0/./; s/\.+$//;
419 return "Unknown ($_)";
420 },
421 PrintConvInv => q{
422 $_ = $val;
423 if (/^(19|20)(\d{2}):(\d{2}):(\d{2}) (\d{2}):(\d{2})$/) {
424 return "$2$3\0\0$4$5\0\0$6\0\0\0\0";
425 } elsif (/^Unknown\s*\((.*)\)$/i) {
426 $_ = $1; tr/./\0/;
427 return $_;
428 } else {
429 return undef;
430 }
431 },
432 },
433 0x2011 => {
434 Name => 'WhiteBalanceBias',
435 Writable => 'int16u',
436 Count => 2,
437 },
438 0x2012 => {
439 Name => 'WhiteBalance',
440 Writable => 'int16u',
441 PrintConv => {
442 0 => 'Manual',
443 1 => 'Daylight', #3
444 3 => 'Shade', #3
445 4 => 'Flash?',
446 6 => 'Fluorescent', #3
447 9 => 'Tungsten?', #PH (EX-Z77)
448 10 => 'Tungsten', #3
449 12 => 'Flash',
450 },
451 },
452 0x2021 => { #JD (guess)
453 Name => 'AFPointPosition',
454 Writable => 'int16u',
455 Count => 4,
456 PrintConv => q{
457 my @v = split ' ', $val;
458 return 'n/a' if $v[0] == 65535 or not $v[1] or not $v[3];
459 sprintf "%.2g %.2g", $v[0]/$v[1], $v[2]/$v[3];
460 },
461 },
462 0x2022 => {
463 Name => 'ObjectDistance',
464 Writable => 'int32u',
465 ValueConv => '$val >= 0x20000000 ? "inf" : $val / 1000',
466 ValueConvInv => '$val eq "inf" ? 0x20000000 : $val * 1000',
467 PrintConv => '$val eq "inf" ? $val : "$val m"',
468 PrintConvInv => '$val=~s/\s*m$//;$val',
469 },
470 # 0x2023 looks interesting (values 0,1,2,3,5 in samples) - PH
471 # - 1 for makeup mode shots (portrait?) (EX-Z450)
472 0x2034 => {
473 Name => 'FlashDistance',
474 Writable => 'int16u',
475 },
476 # 0x203e - normally 62000, but 62001 for anti-shake mode - PH
477 0x2076 => { #PH (EX-Z450)
478 # ("Enhancement" was taken already, so call this "SpecialEffect" for lack of a better name)
479 Name => 'SpecialEffectMode',
480 Writable => 'int8u',
481 Count => 3,
482 PrintConv => {
483 '0 0 0' => 'Off',
484 '1 0 0' => 'Makeup',
485 '2 0 0' => 'Mist Removal',
486 '3 0 0' => 'Vivid Landscape',
487 # have also seen '1 1 1', '2 2 4', '4 3 3', '4 4 4'
488 # '0 0 14' and '0 0 42' - premium auto night shot (EX-Z2300)
489 },
490 },
491 0x2089 => [ #PH
492 {
493 Name => 'FaceInfo1',
494 Condition => '$$valPt =~ /^(\0\0|.\x02\x80\x01\xe0)/s', # (EX-H5)
495 SubDirectory => {
496 TagTable => 'Image::ExifTool::Casio::FaceInfo1',
497 ByteOrder => 'BigEndian',
498 },
499 },{
500 Name => 'FaceInfo2',
501 Condition => '$$valPt =~ /^\x02\x01/', # (EX-H20G,EX-ZR100)
502 SubDirectory => {
503 TagTable => 'Image::ExifTool::Casio::FaceInfo2',
504 ByteOrder => 'LittleEndian',
505 },
506 },{
507 Name => 'FaceInfoUnknown',
508 Unknown => 1,
509 },
510 ],
511 # 0x208a - also some sort of face detection information - PH
512 0x211c => { #PH
513 Name => 'FacesDetected',
514 Format => 'int8u',
515 },
516 0x3000 => {
517 Name => 'RecordMode',
518 Writable => 'int16u',
519 PrintConv => {
520 2 => 'Program AE', #3
521 3 => 'Shutter Priority', #3
522 4 => 'Aperture Priority', #3
523 5 => 'Manual', #3
524 6 => 'Best Shot', #3
525 17 => 'Movie', #PH (UHQ?)
526 19 => 'Movie (19)', #PH (HQ?, EX-P505)
527 20 => 'YouTube Movie', #PH
528 '2 0' => 'Program AE', #PH (NC)
529 '3 0' => 'Shutter Priority', #PH (NC)
530 '4 0' => 'Aperture Priority', #PH (NC)
531 '5 0' => 'Manual', #PH (NC)
532 '6 0' => 'Best Shot', #PH (NC)
533 },
534 },
535 0x3001 => { #3
536 Name => 'ReleaseMode',
537 Writable => 'int16u',
538 PrintConv => {
539 1 => 'Normal',
540 3 => 'AE Bracketing',
541 11 => 'WB Bracketing',
542 13 => 'Contrast Bracketing', #(not sure about translation - PH)
543 19 => 'High Speed Burst', #PH (EX-FH25, 40fps)
544 # have also seen: 2, 7(common), 14, 18 - PH
545 },
546 },
547 0x3002 => {
548 Name => 'Quality',
549 Writable => 'int16u',
550 PrintConv => {
551 1 => 'Economy',
552 2 => 'Normal',
553 3 => 'Fine',
554 },
555 },
556 0x3003 => {
557 Name => 'FocusMode',
558 Writable => 'int16u',
559 PrintConv => {
560 0 => 'Manual', #(guess at translation)
561 1 => 'Focus Lock', #(guess at translation)
562 2 => 'Macro', #3
563 3 => 'Single-Area Auto Focus',
564 5 => 'Infinity', #PH
565 6 => 'Multi-Area Auto Focus',
566 8 => 'Super Macro', #PH (EX-Z2300)
567 },
568 },
569 0x3006 => {
570 Name => 'HometownCity',
571 Writable => 'string',
572 },
573 0x3007 => {
574 Name => 'BestShotMode',
575 Writable => 'int16u',
576 # unfortunately these numbers are model-dependent,
577 # so we can't use a lookup as usual - PH
578 PrintConv => '$val ? $val : "Off"',
579 PrintConvInv => '$val=~/(\d+)/ ? $1 : 0',
580 },
581 0x3008 => { #3
582 Name => 'AutoISO',
583 Writable => 'int16u',
584 PrintConv => {
585 1 => 'On',
586 2 => 'Off',
587 7 => 'On (high sensitivity)', #PH
588 8 => 'On (anti-shake)', #PH
589 10 => 'High Speed', #PH (EX-FC150)
590 },
591 },
592 0x3009 => { #PH (EX-Z77)
593 Name => 'AFMode',
594 Writable => 'int16u',
595 PrintConv => {
596 0 => 'Off',
597 1 => 'On',
598 # have seen 2(EX-Z35 macro/portrait), 3(portrait) and 5(auto mode)
599 4 => 'Face Recognition', # "Family First"
600 },
601 },
602 0x3011 => { #3
603 Name => 'Sharpness',
604 Format => 'int16s',
605 Writable => 'undef',
606 },
607 0x3012 => { #3
608 Name => 'Contrast',
609 Format => 'int16s',
610 Writable => 'undef',
611 },
612 0x3013 => { #3
613 Name => 'Saturation',
614 Format => 'int16s',
615 Writable => 'undef',
616 },
617 0x3014 => {
618 Name => 'ISO',
619 Writable => 'int16u',
620 Priority => 0,
621 },
622 0x3015 => {
623 Name => 'ColorMode',
624 Writable => 'int16u',
625 PrintConv => {
626 0 => 'Off',
627 2 => 'Black & White', #PH (EX-Z400,FH20)
628 3 => 'Sepia', #PH (EX-Z400)
629 },
630 },
631 0x3016 => {
632 Name => 'Enhancement',
633 Writable => 'int16u',
634 PrintConv => {
635 0 => 'Off',
636 1 => 'Scenery', #PH (NC) (EX-Z77)
637 3 => 'Green', #PH (EX-Z77)
638 5 => 'Underwater', #PH (NC) (EX-Z77)
639 9 => 'Flesh Tones', #PH (EX-Z77)
640 },
641 },
642 0x3017 => {
643 Name => 'ColorFilter',
644 Writable => 'int16u',
645 PrintConv => {
646 0 => 'Off',
647 1 => 'Blue', #PH (FH20,Z400)
648 3 => 'Green', #PH (FH20)
649 4 => 'Yellow', #PH (FH20)
650 5 => 'Red', #PH (FH20,Z77)
651 6 => 'Purple', #PH (FH20,Z77,Z400)
652 7 => 'Pink', #PH (FH20)
653 },
654 },
655 0x301b => { #PH
656 Name => 'UnknownMode',
657 Writable => 'int16u',
658 Unknown => 1,
659 PrintConv => {
660 0 => 'Normal',
661 8 => 'Silent Movie',
662 39 => 'HDR', # (EX-ZR10)
663 45 => 'Premium Auto', # (EX-2300)
664 47 => 'Painting', # (EX-2300)
665 49 => 'Crayon Drawing', # (EX-2300)
666 51 => 'Panorama', # (EX-ZR10)
667 52 => 'Art HDR', # (EX-ZR10)
668 },
669 },
670 0x301c => { #3
671 Name => 'SequenceNumber', # for continuous shooting
672 Writable => 'int16u',
673 },
674 0x301d => { #3
675 Name => 'BracketSequence',
676 Writable => 'int16u',
677 Count => 2,
678 },
679 # 0x301e - MultiBracket ? (ref 3)
680 0x3020 => { #3
681 Name => 'ImageStabilization',
682 Writable => 'int16u',
683 PrintConv => {
684 0 => 'Off',
685 1 => 'On',
686 2 => 'Best Shot',
687 # 3 observed in MOV videos (EX-V7)
688 # (newer models write 2 numbers here - PH)
689 '0 0' => 'Off', #PH
690 # have seen '0 1' for EX-Z2000 which has 5 modes: Auto, Camera AS, Image AS, DEMO, Off
691 '16 0' => 'Slow Shutter', #PH (EX-Z77)
692 '18 0' => 'Anti-Shake', #PH (EX-Z77)
693 '20 0' => 'High Sensitivity', #PH (EX-Z77)
694 '0 3' => 'CCD Shift', #PH (guess)
695 '2 3' => 'High Speed Anti-Shake', #PH (EX-FC150)
696 },
697 },
698 0x302a => { #PH (EX-Z450)
699 Name => 'LightingMode', #(just guessing here)
700 Writable => 'int16u',
701 PrintConv => {
702 0 => 'Off',
703 1 => 'High Dynamic Range', # (EX-Z77 anti-blur shot)
704 5 => 'Shadow Enhance Low', #(NC)
705 6 => 'Shadow Enhance High', #(NC)
706 },
707 },
708 0x302b => { #PH (EX-Z77)
709 Name => 'PortraitRefiner',
710 Writable => 'int16u',
711 PrintConv => {
712 0 => 'Off',
713 1 => '+1',
714 2 => '+2',
715 },
716 },
717 0x3030 => { #PH (EX-Z450)
718 Name => 'SpecialEffectLevel',
719 Writable => 'int16u',
720 },
721 0x3031 => { #PH (EX-Z450)
722 Name => 'SpecialEffectSetting',
723 Writable => 'int16u',
724 PrintConv => {
725 0 => 'Off',
726 1 => 'Makeup',
727 2 => 'Mist Removal',
728 3 => 'Vivid Landscape',
729 16 => 'Art Shot', # (EX-Z2300)
730 },
731 },
732 0x3103 => { #5
733 Name => 'DriveMode',
734 Writable => 'int16u',
735 PrintConvColumns => 2,
736 PrintConv => {
737 OTHER => sub {
738 # handle new values of future models
739 my ($val, $inv) = @_;
740 return $val =~ /(\d+)/ ? $1 : undef if $inv;
741 return "Continuous ($val fps)";
742 },
743 0 => 'Single Shot', #PH (NC)
744 1 => 'Continuous Shooting', # (1 fps for the EX-F1)
745 2 => 'Continuous (2 fps)',
746 3 => 'Continuous (3 fps)',
747 4 => 'Continuous (4 fps)',
748 5 => 'Continuous (5 fps)',
749 6 => 'Continuous (6 fps)',
750 7 => 'Continuous (7 fps)',
751 10 => 'Continuous (10 fps)',
752 12 => 'Continuous (12 fps)',
753 15 => 'Continuous (15 fps)',
754 20 => 'Continuous (20 fps)',
755 30 => 'Continuous (30 fps)',
756 40 => 'Continuous (40 fps)', #PH (EX-FH25)
757 60 => 'Continuous (60 fps)',
758 240 => 'Auto-N',
759 },
760 },
761 0x4001 => { #PH (AVI videos)
762 Name => 'CaptureFrameRate',
763 Writable => 'int16u',
764 Count => -1,
765 ValueConv => q{
766 my @v=split(" ",$val);
767 return $val / 1000 if @v == 1;
768 return $v[1] ? "$v[1]-$v[0]" : ($v[0] > 10000 ? $v[0] / 1000 : $v[0]);
769 },
770 ValueConvInv => '$val <= 60 ? $val * 1000 : int($val) . " 0"',
771 },
772 # 0x4002 - AVI videos, related to video quality or size - PH
773 0x4003 => { #PH (AVI and MOV videos)
774 Name => 'VideoQuality',
775 Writable => 'int16u',
776 PrintConv => {
777 1 => 'Standard',
778 # 2 - could this be LP?
779 3 => 'HD (720p)',
780 4 => 'Full HD (1080p)', # (EX-ZR10, 30fps 1920x1080)
781 5 => 'Low', # used in High Speed modes
782 },
783 },
784);
785
786# face detection information (ref PH) (EX-H5)
787%Image::ExifTool::Casio::FaceInfo1 = (
788 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
789 WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
790 CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
791 GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
792 WRITABLE => 1,
793 FIRST_ENTRY => 0,
794 DATAMEMBER => [ 0 ],
795 NOTES => 'Face-detect tags extracted from models such as the EX-H5.',
796 0x00 => { # (NC)
797 Name => 'FacesDetected',
798 DataMember => 'FacesDetected',
799 RawConv => '$$self{FacesDetected} = $val',
800 },
801 0x01 => {
802 Name => 'FaceDetectFrameSize',
803 Condition => '$$self{FacesDetected} >= 1', # (otherwise zeros)
804 Format => 'int16u[2]',
805 },
806 0x0d => {
807 Name => 'Face1Position',
808 Condition => '$$self{FacesDetected} >= 1',
809 Format => 'int16u[4]',
810 Notes => q{
811 left, top, right and bottom of detected face in coordinates of
812 FaceDetectFrameSize, with increasing Y downwards
813 },
814 },
815 # decoding NOT CONFIRMED (NC) for faces 2-10!
816 0x7c => {
817 Name => 'Face2Position',
818 Condition => '$$self{FacesDetected} >= 2',
819 Format => 'int16u[4]',
820 },
821 0xeb => {
822 Name => 'Face3Position',
823 Condition => '$$self{FacesDetected} >= 3',
824 Format => 'int16u[4]',
825 },
826 0x15a => {
827 Name => 'Face4Position',
828 Condition => '$$self{FacesDetected} >= 4',
829 Format => 'int16u[4]',
830 },
831 0x1c9 => {
832 Name => 'Face5Position',
833 Condition => '$$self{FacesDetected} >= 5',
834 Format => 'int16u[4]',
835 },
836 0x238 => {
837 Name => 'Face6Position',
838 Condition => '$$self{FacesDetected} >= 6',
839 Format => 'int16u[4]',
840 },
841 0x2a7 => {
842 Name => 'Face7Position',
843 Condition => '$$self{FacesDetected} >= 7',
844 Format => 'int16u[4]',
845 },
846 0x316 => {
847 Name => 'Face8Position',
848 Condition => '$$self{FacesDetected} >= 8',
849 Format => 'int16u[4]',
850 },
851 0x385 => {
852 Name => 'Face9Position',
853 Condition => '$$self{FacesDetected} >= 9',
854 Format => 'int16u[4]',
855 },
856 0x3f4 => {
857 Name => 'Face10Position',
858 Condition => '$$self{FacesDetected} >= 10',
859 Format => 'int16u[4]',
860 },
861);
862
863# face detection information (ref PH) (EX-ZR100)
864%Image::ExifTool::Casio::FaceInfo2 = (
865 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
866 WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
867 CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
868 GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
869 WRITABLE => 1,
870 FIRST_ENTRY => 0,
871 DATAMEMBER => [ 2 ],
872 NOTES => 'Face-detect tags extracted from models such as the EX-H20G and EX-ZR100.',
873 0x02 => {
874 Name => 'FacesDetected',
875 DataMember => 'FacesDetected',
876 RawConv => '$$self{FacesDetected} = $val',
877 },
878 0x04 => {
879 Name => 'FaceDetectFrameSize',
880 Condition => '$$self{FacesDetected} >= 1',
881 Format => 'int16u[2]',
882 },
883 0x08 => {
884 Name => 'FaceOrientation',
885 Condition => '$$self{FacesDetected} >= 1',
886 PrintConv => {
887 0 => 'Horizontal (normal)',
888 1 => 'Rotate 90 CW',
889 2 => 'Rotate 270 CW',
890 3 => 'Rotate 180', # (NC)
891 },
892 Notes => 'orientation of face relative to unrotated image',
893 },
894 # 0x0a - FaceDetectFrameSize again
895 # 0x11 - Face1Detected flag (1=detected)
896 0x18 => {
897 Name => 'Face1Position',
898 Condition => '$$self{FacesDetected} >= 1',
899 Format => 'int16u[4]',
900 Notes => q{
901 left, top, right and bottom of detected face in coordinates of
902 FaceDetectFrameSize, with increasing Y downwards
903 },
904 },
905 # 0x45 - Face2Detected, etc...
906 0x4c => {
907 Name => 'Face2Position',
908 Condition => '$$self{FacesDetected} >= 2',
909 Format => 'int16u[4]',
910 },
911 0x80 => {
912 Name => 'Face3Position',
913 Condition => '$$self{FacesDetected} >= 3',
914 Format => 'int16u[4]',
915 },
916 0xb4 => {
917 Name => 'Face4Position',
918 Condition => '$$self{FacesDetected} >= 4',
919 Format => 'int16u[4]',
920 },
921 0xe8 => {
922 Name => 'Face5Position',
923 Condition => '$$self{FacesDetected} >= 5',
924 Format => 'int16u[4]',
925 },
926 0x11c => {
927 Name => 'Face6Position',
928 Condition => '$$self{FacesDetected} >= 6',
929 Format => 'int16u[4]',
930 },
931 0x150 => {
932 Name => 'Face7Position',
933 Condition => '$$self{FacesDetected} >= 7',
934 Format => 'int16u[4]',
935 },
936 0x184 => {
937 Name => 'Face8Position',
938 Condition => '$$self{FacesDetected} >= 8',
939 Format => 'int16u[4]',
940 },
941 0x1b8 => {
942 Name => 'Face9Position',
943 Condition => '$$self{FacesDetected} >= 9',
944 Format => 'int16u[4]',
945 },
946 0x1ec => {
947 Name => 'Face10Position',
948 Condition => '$$self{FacesDetected} >= 10',
949 Format => 'int16u[4]',
950 },
951);
952
953# Casio APP1 QVCI segment found in QV-7000SX images (ref PH)
954%Image::ExifTool::Casio::QVCI = (
955 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
956 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
957 FIRST_ENTRY => 0,
958 NOTES => q{
959 This information is found in the APP1 QVCI segment of JPEG images from the
960 Casio QV-7000SX.
961 },
962 0x2c => {
963 Name => 'CasioQuality',
964 PrintConv => {
965 1 => 'Economy',
966 2 => 'Normal',
967 3 => 'Fine',
968 4 => 'Super Fine',
969 },
970 },
971 0x37 => {
972 Name => 'FocalRange',
973 Unknown => 1,
974 },
975 0x4d => {
976 Name => 'DateTimeOriginal',
977 Description => 'Date/Time Original',
978 Format => 'string[20]',
979 Groups => { 2 => 'Time' },
980 ValueConv => '$val=~tr/./:/; $val=~s/(\d+:\d+:\d+):/$1 /; $val',
981 PrintConv => '$self->ConvertDateTime($val)',
982 },
983 0x62 => {
984 Name => 'ModelType',
985 Format => 'string[7]',
986 },
987 0x72 => { # could be serial number or manufacture date in form YYMMDDxx ?
988 Name => 'ManufactureIndex',
989 Format => 'string[9]',
990 },
991 0x7c => {
992 Name => 'ManufactureCode',
993 Format => 'string[9]',
994 },
995);
996
997# tags in Casio AVI videos (ref PH)
998%Image::ExifTool::Casio::AVI = (
999 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1000 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1001 FIRST_ENTRY => 0,
1002 NOTES => 'This information is found in Casio GV-10 AVI videos.',
1003 0 => {
1004 Name => 'Software', # (equivalent to RIFF Software tag)
1005 Format => 'string',
1006 },
1007);
1008
1009
10101; # end
1011
1012__END__
1013
1014=head1 NAME
1015
1016Image::ExifTool::Casio - Casio EXIF maker notes tags
1017
1018=head1 SYNOPSIS
1019
1020This module is loaded automatically by Image::ExifTool when required.
1021
1022=head1 DESCRIPTION
1023
1024This module contains definitions required by Image::ExifTool to interpret
1025Casio maker notes in EXIF information.
1026
1027=head1 AUTHOR
1028
1029Copyright 2003-2011, Phil Harvey (phil at owl.phy.queensu.ca)
1030
1031This library is free software; you can redistribute it and/or modify it
1032under the same terms as Perl itself.
1033
1034=head1 REFERENCES
1035
1036=over 4
1037
1038=item L<http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html>
1039
1040=back
1041
1042=head1 ACKNOWLEDGEMENTS
1043
1044Thanks to Joachim Loehr for adding support for the type 2 maker notes, and
1045Jens Duttke and Robert Chi for decoding some tags.
1046
1047=head1 SEE ALSO
1048
1049L<Image::ExifTool::TagNames/Casio Tags>,
1050L<Image::ExifTool(3pm)|Image::ExifTool>
1051
1052=cut
Note: See TracBrowser for help on using the repository browser.