source: josm/trunk/src/com/drew/metadata/exif/makernotes/CanonMakernoteDescriptor.java@ 13722

Last change on this file since 13722 was 13061, checked in by Don-vip, 7 years ago

fix #15505 - update to metadata-extractor 2.10.1

File size: 42.9 KB
Line 
1/*
2 * Copyright 2002-2017 Drew Noakes
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * More information about this project is available at:
17 *
18 * https://drewnoakes.com/code/exif/
19 * https://github.com/drewnoakes/metadata-extractor
20 */
21package com.drew.metadata.exif.makernotes;
22
23import com.drew.lang.annotations.NotNull;
24import com.drew.lang.annotations.Nullable;
25import com.drew.metadata.TagDescriptor;
26
27import java.text.DecimalFormat;
28import java.util.HashMap;
29
30import static com.drew.metadata.exif.makernotes.CanonMakernoteDirectory.*;
31
32/**
33 * Provides human-readable string representations of tag values stored in a {@link CanonMakernoteDirectory}.
34 *
35 * @author Drew Noakes https://drewnoakes.com
36 */
37@SuppressWarnings("WeakerAccess")
38public class CanonMakernoteDescriptor extends TagDescriptor<CanonMakernoteDirectory>
39{
40 public CanonMakernoteDescriptor(@NotNull CanonMakernoteDirectory directory)
41 {
42 super(directory);
43 }
44
45 @Override
46 @Nullable
47 public String getDescription(int tagType)
48 {
49 switch (tagType) {
50 case TAG_CANON_SERIAL_NUMBER:
51 return getSerialNumberDescription();
52 case CameraSettings.TAG_FLASH_ACTIVITY:
53 return getFlashActivityDescription();
54 case CameraSettings.TAG_FOCUS_TYPE:
55 return getFocusTypeDescription();
56 case CameraSettings.TAG_DIGITAL_ZOOM:
57 return getDigitalZoomDescription();
58 case CameraSettings.TAG_RECORD_MODE:
59 return getRecordModeDescription();
60 case CameraSettings.TAG_QUALITY:
61 return getQualityDescription();
62 case CameraSettings.TAG_MACRO_MODE:
63 return getMacroModeDescription();
64 case CameraSettings.TAG_SELF_TIMER_DELAY:
65 return getSelfTimerDelayDescription();
66 case CameraSettings.TAG_FLASH_MODE:
67 return getFlashModeDescription();
68 case CameraSettings.TAG_CONTINUOUS_DRIVE_MODE:
69 return getContinuousDriveModeDescription();
70 case CameraSettings.TAG_FOCUS_MODE_1:
71 return getFocusMode1Description();
72 case CameraSettings.TAG_IMAGE_SIZE:
73 return getImageSizeDescription();
74 case CameraSettings.TAG_EASY_SHOOTING_MODE:
75 return getEasyShootingModeDescription();
76 case CameraSettings.TAG_CONTRAST:
77 return getContrastDescription();
78 case CameraSettings.TAG_SATURATION:
79 return getSaturationDescription();
80 case CameraSettings.TAG_SHARPNESS:
81 return getSharpnessDescription();
82 case CameraSettings.TAG_ISO:
83 return getIsoDescription();
84 case CameraSettings.TAG_METERING_MODE:
85 return getMeteringModeDescription();
86 case CameraSettings.TAG_AF_POINT_SELECTED:
87 return getAfPointSelectedDescription();
88 case CameraSettings.TAG_EXPOSURE_MODE:
89 return getExposureModeDescription();
90 case CameraSettings.TAG_LENS_TYPE:
91 return getLensTypeDescription();
92 case CameraSettings.TAG_LONG_FOCAL_LENGTH:
93 return getLongFocalLengthDescription();
94 case CameraSettings.TAG_SHORT_FOCAL_LENGTH:
95 return getShortFocalLengthDescription();
96 case CameraSettings.TAG_FOCAL_UNITS_PER_MM:
97 return getFocalUnitsPerMillimetreDescription();
98 case CameraSettings.TAG_FLASH_DETAILS:
99 return getFlashDetailsDescription();
100 case CameraSettings.TAG_FOCUS_MODE_2:
101 return getFocusMode2Description();
102 case FocalLength.TAG_WHITE_BALANCE:
103 return getWhiteBalanceDescription();
104 case FocalLength.TAG_AF_POINT_USED:
105 return getAfPointUsedDescription();
106 case FocalLength.TAG_FLASH_BIAS:
107 return getFlashBiasDescription();
108 case AFInfo.TAG_AF_POINTS_IN_FOCUS:
109 return getTagAfPointsInFocus();
110 case CameraSettings.TAG_MAX_APERTURE:
111 return getMaxApertureDescription();
112 case CameraSettings.TAG_MIN_APERTURE:
113 return getMinApertureDescription();
114 case CameraSettings.TAG_FOCUS_CONTINUOUS:
115 return getFocusContinuousDescription();
116 case CameraSettings.TAG_AE_SETTING:
117 return getAESettingDescription();
118 case CanonMakernoteDirectory.CameraSettings.TAG_DISPLAY_APERTURE:
119 return getDisplayApertureDescription();
120 case CanonMakernoteDirectory.CameraSettings.TAG_SPOT_METERING_MODE:
121 return getSpotMeteringModeDescription();
122 case CanonMakernoteDirectory.CameraSettings.TAG_PHOTO_EFFECT:
123 return getPhotoEffectDescription();
124 case CanonMakernoteDirectory.CameraSettings.TAG_MANUAL_FLASH_OUTPUT:
125 return getManualFlashOutputDescription();
126 case CanonMakernoteDirectory.CameraSettings.TAG_COLOR_TONE:
127 return getColorToneDescription();
128 case CanonMakernoteDirectory.CameraSettings.TAG_SRAW_QUALITY:
129 return getSRawQualityDescription();
130
131 // It turns out that these values are dependent upon the camera model and therefore the below code was
132 // incorrect for some Canon models. This needs to be revisited.
133
134// case TAG_CANON_CUSTOM_FUNCTION_LONG_EXPOSURE_NOISE_REDUCTION:
135// return getLongExposureNoiseReductionDescription();
136// case TAG_CANON_CUSTOM_FUNCTION_SHUTTER_AUTO_EXPOSURE_LOCK_BUTTONS:
137// return getShutterAutoExposureLockButtonDescription();
138// case TAG_CANON_CUSTOM_FUNCTION_MIRROR_LOCKUP:
139// return getMirrorLockupDescription();
140// case TAG_CANON_CUSTOM_FUNCTION_TV_AV_AND_EXPOSURE_LEVEL:
141// return getTvAndAvExposureLevelDescription();
142// case TAG_CANON_CUSTOM_FUNCTION_AF_ASSIST_LIGHT:
143// return getAutoFocusAssistLightDescription();
144// case TAG_CANON_CUSTOM_FUNCTION_SHUTTER_SPEED_IN_AV_MODE:
145// return getShutterSpeedInAvModeDescription();
146// case TAG_CANON_CUSTOM_FUNCTION_BRACKETING:
147// return getAutoExposureBracketingSequenceAndAutoCancellationDescription();
148// case TAG_CANON_CUSTOM_FUNCTION_SHUTTER_CURTAIN_SYNC:
149// return getShutterCurtainSyncDescription();
150// case TAG_CANON_CUSTOM_FUNCTION_AF_STOP:
151// return getLensAutoFocusStopButtonDescription();
152// case TAG_CANON_CUSTOM_FUNCTION_FILL_FLASH_REDUCTION:
153// return getFillFlashReductionDescription();
154// case TAG_CANON_CUSTOM_FUNCTION_MENU_BUTTON_RETURN:
155// return getMenuButtonReturnPositionDescription();
156// case TAG_CANON_CUSTOM_FUNCTION_SET_BUTTON_FUNCTION:
157// return getSetButtonFunctionWhenShootingDescription();
158// case TAG_CANON_CUSTOM_FUNCTION_SENSOR_CLEANING:
159// return getSensorCleaningDescription();
160 default:
161 return super.getDescription(tagType);
162 }
163 }
164
165 @Nullable
166 public String getSerialNumberDescription()
167 {
168 // http://www.ozhiker.com/electronics/pjmt/jpeg_info/canon_mn.html
169 Integer value = _directory.getInteger(TAG_CANON_SERIAL_NUMBER);
170 if (value == null)
171 return null;
172 return String.format("%04X%05d", (value >> 8) & 0xFF, value & 0xFF);
173 }
174
175/*
176 @Nullable
177 public String getLongExposureNoiseReductionDescription()
178 {
179 Integer value = _directory.getInteger(TAG_CANON_CUSTOM_FUNCTION_LONG_EXPOSURE_NOISE_REDUCTION);
180 if (value==null)
181 return null;
182 switch (value) {
183 case 0: return "Off";
184 case 1: return "On";
185 default: return "Unknown (" + value + ")";
186 }
187 }
188
189 @Nullable
190 public String getShutterAutoExposureLockButtonDescription()
191 {
192 Integer value = _directory.getInteger(TAG_CANON_CUSTOM_FUNCTION_SHUTTER_AUTO_EXPOSURE_LOCK_BUTTONS);
193 if (value==null)
194 return null;
195 switch (value) {
196 case 0: return "AF/AE lock";
197 case 1: return "AE lock/AF";
198 case 2: return "AF/AF lock";
199 case 3: return "AE+release/AE+AF";
200 default: return "Unknown (" + value + ")";
201 }
202 }
203
204 @Nullable
205 public String getMirrorLockupDescription()
206 {
207 Integer value = _directory.getInteger(TAG_CANON_CUSTOM_FUNCTION_MIRROR_LOCKUP);
208 if (value==null)
209 return null;
210 switch (value) {
211 case 0: return "Disabled";
212 case 1: return "Enabled";
213 default: return "Unknown (" + value + ")";
214 }
215 }
216
217 @Nullable
218 public String getTvAndAvExposureLevelDescription()
219 {
220 Integer value = _directory.getInteger(TAG_CANON_CUSTOM_FUNCTION_TV_AV_AND_EXPOSURE_LEVEL);
221 if (value==null)
222 return null;
223 switch (value) {
224 case 0: return "1/2 stop";
225 case 1: return "1/3 stop";
226 default: return "Unknown (" + value + ")";
227 }
228 }
229
230 @Nullable
231 public String getAutoFocusAssistLightDescription()
232 {
233 Integer value = _directory.getInteger(TAG_CANON_CUSTOM_FUNCTION_AF_ASSIST_LIGHT);
234 if (value==null)
235 return null;
236 switch (value) {
237 case 0: return "On (Auto)";
238 case 1: return "Off";
239 default: return "Unknown (" + value + ")";
240 }
241 }
242
243 @Nullable
244 public String getShutterSpeedInAvModeDescription()
245 {
246 Integer value = _directory.getInteger(TAG_CANON_CUSTOM_FUNCTION_SHUTTER_SPEED_IN_AV_MODE);
247 if (value==null)
248 return null;
249 switch (value) {
250 case 0: return "Automatic";
251 case 1: return "1/200 (fixed)";
252 default: return "Unknown (" + value + ")";
253 }
254 }
255
256 @Nullable
257 public String getAutoExposureBracketingSequenceAndAutoCancellationDescription()
258 {
259 Integer value = _directory.getInteger(TAG_CANON_CUSTOM_FUNCTION_BRACKETING);
260 if (value==null)
261 return null;
262 switch (value) {
263 case 0: return "0,-,+ / Enabled";
264 case 1: return "0,-,+ / Disabled";
265 case 2: return "-,0,+ / Enabled";
266 case 3: return "-,0,+ / Disabled";
267 default: return "Unknown (" + value + ")";
268 }
269 }
270
271 @Nullable
272 public String getShutterCurtainSyncDescription()
273 {
274 Integer value = _directory.getInteger(TAG_CANON_CUSTOM_FUNCTION_SHUTTER_CURTAIN_SYNC);
275 if (value==null)
276 return null;
277 switch (value) {
278 case 0: return "1st Curtain Sync";
279 case 1: return "2nd Curtain Sync";
280 default: return "Unknown (" + value + ")";
281 }
282 }
283
284 @Nullable
285 public String getLensAutoFocusStopButtonDescription()
286 {
287 Integer value = _directory.getInteger(TAG_CANON_CUSTOM_FUNCTION_AF_STOP);
288 if (value==null)
289 return null;
290 switch (value) {
291 case 0: return "AF stop";
292 case 1: return "Operate AF";
293 case 2: return "Lock AE and start timer";
294 default: return "Unknown (" + value + ")";
295 }
296 }
297
298 @Nullable
299 public String getFillFlashReductionDescription()
300 {
301 Integer value = _directory.getInteger(TAG_CANON_CUSTOM_FUNCTION_FILL_FLASH_REDUCTION);
302 if (value==null)
303 return null;
304 switch (value) {
305 case 0: return "Enabled";
306 case 1: return "Disabled";
307 default: return "Unknown (" + value + ")";
308 }
309 }
310
311 @Nullable
312 public String getMenuButtonReturnPositionDescription()
313 {
314 Integer value = _directory.getInteger(TAG_CANON_CUSTOM_FUNCTION_MENU_BUTTON_RETURN);
315 if (value==null)
316 return null;
317 switch (value) {
318 case 0: return "Top";
319 case 1: return "Previous (volatile)";
320 case 2: return "Previous";
321 default: return "Unknown (" + value + ")";
322 }
323 }
324
325 @Nullable
326 public String getSetButtonFunctionWhenShootingDescription()
327 {
328 Integer value = _directory.getInteger(TAG_CANON_CUSTOM_FUNCTION_SET_BUTTON_FUNCTION);
329 if (value==null)
330 return null;
331 switch (value) {
332 case 0: return "Not Assigned";
333 case 1: return "Change Quality";
334 case 2: return "Change ISO Speed";
335 case 3: return "Select Parameters";
336 default: return "Unknown (" + value + ")";
337 }
338 }
339
340 @Nullable
341 public String getSensorCleaningDescription()
342 {
343 Integer value = _directory.getInteger(TAG_CANON_CUSTOM_FUNCTION_SENSOR_CLEANING);
344 if (value==null)
345 return null;
346 switch (value) {
347 case 0: return "Disabled";
348 case 1: return "Enabled";
349 default: return "Unknown (" + value + ")";
350 }
351 }
352*/
353
354 @Nullable
355 public String getFlashBiasDescription()
356 {
357 Integer value = _directory.getInteger(FocalLength.TAG_FLASH_BIAS);
358
359 if (value == null)
360 return null;
361
362 boolean isNegative = false;
363 if (value > 0xF000) {
364 isNegative = true;
365 value = 0xFFFF - value;
366 value++;
367 }
368
369 // this tag is interesting in that the values returned are:
370 // 0, 0.375, 0.5, 0.626, 1
371 // not
372 // 0, 0.33, 0.5, 0.66, 1
373
374 return (isNegative ? "-" : "") + Float.toString(value / 32f) + " EV";
375 }
376
377 @Nullable
378 public String getAfPointUsedDescription()
379 {
380 Integer value = _directory.getInteger(FocalLength.TAG_AF_POINT_USED);
381 if (value == null)
382 return null;
383 if ((value & 0x7) == 0) {
384 return "Right";
385 } else if ((value & 0x7) == 1) {
386 return "Centre";
387 } else if ((value & 0x7) == 2) {
388 return "Left";
389 } else {
390 return "Unknown (" + value + ")";
391 }
392 }
393
394 @Nullable
395 public String getTagAfPointsInFocus()
396 {
397 Integer value = _directory.getInteger(AFInfo.TAG_AF_POINTS_IN_FOCUS);
398 if (value == null)
399 return null;
400
401 StringBuilder sb = new StringBuilder();
402
403 for (int i = 0; i < 16; i++)
404 {
405 if ((value & 1 << i) != 0)
406 {
407 if (sb.length() != 0)
408 sb.append(',');
409 sb.append(i);
410 }
411 }
412
413 return sb.length() == 0 ? "None" : sb.toString();
414 }
415
416 @Nullable
417 public String getWhiteBalanceDescription()
418 {
419 return getIndexedDescription(
420 FocalLength.TAG_WHITE_BALANCE,
421 "Auto",
422 "Sunny",
423 "Cloudy",
424 "Tungsten",
425 "Florescent",
426 "Flash",
427 "Custom"
428 );
429 }
430
431 @Nullable
432 public String getFocusMode2Description()
433 {
434 return getIndexedDescription(CameraSettings.TAG_FOCUS_MODE_2, "Single", "Continuous");
435 }
436
437 @Nullable
438 public String getFlashDetailsDescription()
439 {
440 Integer value = _directory.getInteger(CameraSettings.TAG_FLASH_DETAILS);
441 if (value == null)
442 return null;
443 if (((value >> 14) & 1) != 0) {
444 return "External E-TTL";
445 }
446 if (((value >> 13) & 1) != 0) {
447 return "Internal flash";
448 }
449 if (((value >> 11) & 1) != 0) {
450 return "FP sync used";
451 }
452 if (((value >> 4) & 1) != 0) {
453 return "FP sync enabled";
454 }
455 return "Unknown (" + value + ")";
456 }
457
458 @Nullable
459 public String getFocalUnitsPerMillimetreDescription()
460 {
461 Integer value = _directory.getInteger(CameraSettings.TAG_FOCAL_UNITS_PER_MM);
462 if (value == null)
463 return null;
464 if (value != 0) {
465 return Integer.toString(value);
466 } else {
467 return "";
468 }
469 }
470
471 @Nullable
472 public String getShortFocalLengthDescription()
473 {
474 Integer value = _directory.getInteger(CameraSettings.TAG_SHORT_FOCAL_LENGTH);
475 if (value == null)
476 return null;
477 String units = getFocalUnitsPerMillimetreDescription();
478 return Integer.toString(value) + " " + units;
479 }
480
481 @Nullable
482 public String getLongFocalLengthDescription()
483 {
484 Integer value = _directory.getInteger(CameraSettings.TAG_LONG_FOCAL_LENGTH);
485 if (value == null)
486 return null;
487 String units = getFocalUnitsPerMillimetreDescription();
488 return Integer.toString(value) + " " + units;
489 }
490
491 @Nullable
492 public String getExposureModeDescription()
493 {
494 return getIndexedDescription(
495 CameraSettings.TAG_EXPOSURE_MODE,
496 "Easy shooting",
497 "Program",
498 "Tv-priority",
499 "Av-priority",
500 "Manual",
501 "A-DEP"
502 );
503 }
504
505 @Nullable
506 public String getLensTypeDescription() {
507 Integer value = _directory.getInteger(CameraSettings.TAG_LENS_TYPE);
508 if (value == null)
509 return null;
510
511 return _lensTypeById.containsKey(value)
512 ? _lensTypeById.get(value)
513 : String.format("Unknown (%d)", value);
514 }
515
516 @Nullable
517 public String getMaxApertureDescription()
518 {
519 Integer value = _directory.getInteger(CameraSettings.TAG_MAX_APERTURE);
520 if (value == null)
521 return null;
522 if (value > 512)
523 return String.format("Unknown (%d)", value);
524 return getFStopDescription(Math.exp(decodeCanonEv(value) * Math.log(2.0) / 2.0));
525 }
526
527 @Nullable
528 public String getMinApertureDescription()
529 {
530 Integer value = _directory.getInteger(CameraSettings.TAG_MIN_APERTURE);
531 if (value == null)
532 return null;
533 if (value > 512)
534 return String.format("Unknown (%d)", value);
535 return getFStopDescription(Math.exp(decodeCanonEv(value) * Math.log(2.0) / 2.0));
536 }
537
538 @Nullable
539 public String getAfPointSelectedDescription()
540 {
541 return getIndexedDescription(
542 CameraSettings.TAG_AF_POINT_SELECTED,
543 0x3000,
544 "None (MF)",
545 "Auto selected",
546 "Right",
547 "Centre",
548 "Left"
549 );
550 }
551
552 @Nullable
553 public String getMeteringModeDescription()
554 {
555 return getIndexedDescription(
556 CameraSettings.TAG_METERING_MODE,
557 3,
558 "Evaluative",
559 "Partial",
560 "Centre weighted"
561 );
562 }
563
564 @Nullable
565 public String getIsoDescription()
566 {
567 Integer value = _directory.getInteger(CameraSettings.TAG_ISO);
568 if (value == null)
569 return null;
570
571 // Canon PowerShot S3 is special
572 int canonMask = 0x4000;
573 if ((value & canonMask) != 0)
574 return "" + (value & ~canonMask);
575
576 switch (value) {
577 case 0:
578 return "Not specified (see ISOSpeedRatings tag)";
579 case 15:
580 return "Auto";
581 case 16:
582 return "50";
583 case 17:
584 return "100";
585 case 18:
586 return "200";
587 case 19:
588 return "400";
589 default:
590 return "Unknown (" + value + ")";
591 }
592 }
593
594 @Nullable
595 public String getSharpnessDescription()
596 {
597 Integer value = _directory.getInteger(CameraSettings.TAG_SHARPNESS);
598 if (value == null)
599 return null;
600 switch (value) {
601 case 0xFFFF:
602 return "Low";
603 case 0x000:
604 return "Normal";
605 case 0x001:
606 return "High";
607 default:
608 return "Unknown (" + value + ")";
609 }
610 }
611
612 @Nullable
613 public String getSaturationDescription()
614 {
615 Integer value = _directory.getInteger(CameraSettings.TAG_SATURATION);
616 if (value == null)
617 return null;
618 switch (value) {
619 case 0xFFFF:
620 return "Low";
621 case 0x000:
622 return "Normal";
623 case 0x001:
624 return "High";
625 default:
626 return "Unknown (" + value + ")";
627 }
628 }
629
630 @Nullable
631 public String getContrastDescription()
632 {
633 Integer value = _directory.getInteger(CameraSettings.TAG_CONTRAST);
634 if (value == null)
635 return null;
636 switch (value) {
637 case 0xFFFF:
638 return "Low";
639 case 0x000:
640 return "Normal";
641 case 0x001:
642 return "High";
643 default:
644 return "Unknown (" + value + ")";
645 }
646 }
647
648 @Nullable
649 public String getEasyShootingModeDescription()
650 {
651 return getIndexedDescription(
652 CameraSettings.TAG_EASY_SHOOTING_MODE,
653 "Full auto",
654 "Manual",
655 "Landscape",
656 "Fast shutter",
657 "Slow shutter",
658 "Night",
659 "B&W",
660 "Sepia",
661 "Portrait",
662 "Sports",
663 "Macro / Closeup",
664 "Pan focus"
665 );
666 }
667
668 @Nullable
669 public String getImageSizeDescription()
670 {
671 return getIndexedDescription(
672 CameraSettings.TAG_IMAGE_SIZE,
673 "Large",
674 "Medium",
675 "Small"
676 );
677 }
678
679 @Nullable
680 public String getFocusMode1Description()
681 {
682 return getIndexedDescription(
683 CameraSettings.TAG_FOCUS_MODE_1,
684 "One-shot",
685 "AI Servo",
686 "AI Focus",
687 "Manual Focus",
688 // TODO should check field 32 here (FOCUS_MODE_2)
689 "Single",
690 "Continuous",
691 "Manual Focus"
692 );
693 }
694
695 @Nullable
696 public String getContinuousDriveModeDescription()
697 {
698 Integer value = _directory.getInteger(CameraSettings.TAG_CONTINUOUS_DRIVE_MODE);
699 if (value == null)
700 return null;
701 switch (value) {
702 case 0:
703 final Integer delay = _directory.getInteger(CameraSettings.TAG_SELF_TIMER_DELAY);
704 if (delay != null)
705 return delay == 0 ? "Single shot" : "Single shot with self-timer";
706 case 1:
707 return "Continuous";
708 }
709 return "Unknown (" + value + ")";
710 }
711
712 @Nullable
713 public String getFlashModeDescription()
714 {
715 Integer value = _directory.getInteger(CameraSettings.TAG_FLASH_MODE);
716 if (value == null)
717 return null;
718 switch (value) {
719 case 0:
720 return "No flash fired";
721 case 1:
722 return "Auto";
723 case 2:
724 return "On";
725 case 3:
726 return "Red-eye reduction";
727 case 4:
728 return "Slow-synchro";
729 case 5:
730 return "Auto and red-eye reduction";
731 case 6:
732 return "On and red-eye reduction";
733 case 16:
734 // note: this value not set on Canon D30
735 return "External flash";
736 default:
737 return "Unknown (" + value + ")";
738 }
739 }
740
741 @Nullable
742 public String getSelfTimerDelayDescription()
743 {
744 Integer value = _directory.getInteger(CameraSettings.TAG_SELF_TIMER_DELAY);
745 if (value == null)
746 return null;
747 if (value == 0) {
748 return "Self timer not used";
749 } else {
750 DecimalFormat format = new DecimalFormat("0.##");
751 return format.format((double)value * 0.1d) + " sec";
752 }
753 }
754
755 @Nullable
756 public String getMacroModeDescription()
757 {
758 return getIndexedDescription(CameraSettings.TAG_MACRO_MODE, 1, "Macro", "Normal");
759 }
760
761 @Nullable
762 public String getQualityDescription()
763 {
764 return getIndexedDescription(CameraSettings.TAG_QUALITY, 2, "Normal", "Fine", null, "Superfine");
765 }
766
767 @Nullable
768 public String getDigitalZoomDescription()
769 {
770 return getIndexedDescription(CameraSettings.TAG_DIGITAL_ZOOM, "No digital zoom", "2x", "4x");
771 }
772
773 @Nullable
774 public String getRecordModeDescription()
775 {
776 return getIndexedDescription(CameraSettings.TAG_RECORD_MODE, 1, "JPEG", "CRW+THM", "AVI+THM", "TIF", "TIF+JPEG", "CR2", "CR2+JPEG", null, "MOV", "MP4");
777 }
778
779 @Nullable
780 public String getFocusTypeDescription()
781 {
782 Integer value = _directory.getInteger(CameraSettings.TAG_FOCUS_TYPE);
783 if (value == null)
784 return null;
785 switch (value) {
786 case 0:
787 return "Manual";
788 case 1:
789 return "Auto";
790 case 3:
791 return "Close-up (Macro)";
792 case 8:
793 return "Locked (Pan Mode)";
794 default:
795 return "Unknown (" + value + ")";
796 }
797 }
798
799 @Nullable
800 public String getFlashActivityDescription()
801 {
802 return getIndexedDescription(CameraSettings.TAG_FLASH_ACTIVITY, "Flash did not fire", "Flash fired");
803 }
804
805 @Nullable
806 public String getFocusContinuousDescription()
807 {
808 return getIndexedDescription(CameraSettings.TAG_FOCUS_CONTINUOUS, 0,
809 "Single", "Continuous", null, null, null, null, null, null, "Manual");
810 }
811
812 @Nullable
813 public String getAESettingDescription()
814 {
815 return getIndexedDescription(CameraSettings.TAG_AE_SETTING, 0,
816 "Normal AE", "Exposure Compensation", "AE Lock", "AE Lock + Exposure Comp.", "No AE");
817 }
818
819 @Nullable
820 public String getDisplayApertureDescription()
821 {
822 Integer value = _directory.getInteger(CameraSettings.TAG_DISPLAY_APERTURE);
823 if (value == null)
824 return null;
825
826 if (value == 0xFFFF)
827 return value.toString();
828 return getFStopDescription(value / 10f);
829 }
830
831 @Nullable
832 public String getSpotMeteringModeDescription()
833 {
834 return getIndexedDescription(CanonMakernoteDirectory.CameraSettings.TAG_SPOT_METERING_MODE, 0,
835 "Center", "AF Point");
836 }
837
838 @Nullable
839 public String getPhotoEffectDescription()
840 {
841 Integer value = _directory.getInteger(CameraSettings.TAG_PHOTO_EFFECT);
842 if (value == null)
843 return null;
844
845 switch (value)
846 {
847 case 0:
848 return "Off";
849 case 1:
850 return "Vivid";
851 case 2:
852 return "Neutral";
853 case 3:
854 return "Smooth";
855 case 4:
856 return "Sepia";
857 case 5:
858 return "B&W";
859 case 6:
860 return "Custom";
861 case 100:
862 return "My Color Data";
863 default:
864 return "Unknown (" + value + ")";
865 }
866 }
867
868 @Nullable
869 public String getManualFlashOutputDescription()
870 {
871 Integer value = _directory.getInteger(CameraSettings.TAG_MANUAL_FLASH_OUTPUT);
872 if (value == null)
873 return null;
874
875 switch (value)
876 {
877 case 0:
878 return "n/a";
879 case 0x500:
880 return "Full";
881 case 0x502:
882 return "Medium";
883 case 0x504:
884 return "Low";
885 case 0x7fff:
886 return "n/a"; // (EOS models)
887 default:
888 return "Unknown (" + value + ")";
889 }
890 }
891
892 @Nullable
893 public String getColorToneDescription()
894 {
895 Integer value = _directory.getInteger(CameraSettings.TAG_COLOR_TONE);
896 if (value == null)
897 return null;
898
899 return value == 0x7fff ? "n/a" : value.toString();
900 }
901
902 @Nullable
903 public String getSRawQualityDescription()
904 {
905 return getIndexedDescription(CanonMakernoteDirectory.CameraSettings.TAG_SRAW_QUALITY, 0, "n/a", "sRAW1 (mRAW)", "sRAW2 (sRAW)");
906 }
907
908 /**
909 * Canon hex-based EV (modulo 0x20) to real number.
910 *
911 * Converted from Exiftool version 10.10 created by Phil Harvey
912 * http://www.sno.phy.queensu.ca/~phil/exiftool/
913 * lib\Image\ExifTool\Canon.pm
914 *
915 * eg) 0x00 -> 0
916 * 0x0c -> 0.33333
917 * 0x10 -> 0.5
918 * 0x14 -> 0.66666
919 * 0x20 -> 1 ... etc
920 */
921 private double decodeCanonEv(int val)
922 {
923 int sign = 1;
924 if (val < 0)
925 {
926 val = -val;
927 sign = -1;
928 }
929
930 int frac = val & 0x1f;
931 val -= frac;
932
933 if (frac == 0x0c)
934 frac = 0x20 / 3;
935 else if (frac == 0x14)
936 frac = 0x40 / 3;
937
938 return sign * (val + frac) / (double)0x20;
939 }
940
941 /**
942 * Map from <see cref="CanonMakernoteDirectory.CameraSettings.TagLensType"/> to string descriptions.
943 *
944 * Data sourced from http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Canon.html#LensType
945 *
946 * Note that only Canon lenses are listed. Lenses from other manufacturers may identify themselves to the camera
947 * as being from this set, but in fact may be quite different. This limits the usefulness of this data,
948 * unfortunately.
949 */
950 private static final HashMap<Integer, String> _lensTypeById = new HashMap<Integer, String>();
951
952 static {
953 _lensTypeById.put(1, "Canon EF 50mm f/1.8");
954 _lensTypeById.put(2, "Canon EF 28mm f/2.8");
955 _lensTypeById.put(3, "Canon EF 135mm f/2.8 Soft");
956 _lensTypeById.put(4, "Canon EF 35-105mm f/3.5-4.5 or Sigma Lens");
957 _lensTypeById.put(5, "Canon EF 35-70mm f/3.5-4.5");
958 _lensTypeById.put(6, "Canon EF 28-70mm f/3.5-4.5 or Sigma or Tokina Lens");
959 _lensTypeById.put(7, "Canon EF 100-300mm f/5.6L");
960 _lensTypeById.put(8, "Canon EF 100-300mm f/5.6 or Sigma or Tokina Lens");
961 _lensTypeById.put(9, "Canon EF 70-210mm f/4");
962 _lensTypeById.put(10, "Canon EF 50mm f/2.5 Macro or Sigma Lens");
963 _lensTypeById.put(11, "Canon EF 35mm f/2");
964 _lensTypeById.put(13, "Canon EF 15mm f/2.8 Fisheye");
965 _lensTypeById.put(14, "Canon EF 50-200mm f/3.5-4.5L");
966 _lensTypeById.put(15, "Canon EF 50-200mm f/3.5-4.5");
967 _lensTypeById.put(16, "Canon EF 35-135mm f/3.5-4.5");
968 _lensTypeById.put(17, "Canon EF 35-70mm f/3.5-4.5A");
969 _lensTypeById.put(18, "Canon EF 28-70mm f/3.5-4.5");
970 _lensTypeById.put(20, "Canon EF 100-200mm f/4.5A");
971 _lensTypeById.put(21, "Canon EF 80-200mm f/2.8L");
972 _lensTypeById.put(22, "Canon EF 20-35mm f/2.8L or Tokina Lens");
973 _lensTypeById.put(23, "Canon EF 35-105mm f/3.5-4.5");
974 _lensTypeById.put(24, "Canon EF 35-80mm f/4-5.6 Power Zoom");
975 _lensTypeById.put(25, "Canon EF 35-80mm f/4-5.6 Power Zoom");
976 _lensTypeById.put(26, "Canon EF 100mm f/2.8 Macro or Other Lens");
977 _lensTypeById.put(27, "Canon EF 35-80mm f/4-5.6");
978 _lensTypeById.put(28, "Canon EF 80-200mm f/4.5-5.6 or Tamron Lens");
979 _lensTypeById.put(29, "Canon EF 50mm f/1.8 II");
980 _lensTypeById.put(30, "Canon EF 35-105mm f/4.5-5.6");
981 _lensTypeById.put(31, "Canon EF 75-300mm f/4-5.6 or Tamron Lens");
982 _lensTypeById.put(32, "Canon EF 24mm f/2.8 or Sigma Lens");
983 _lensTypeById.put(33, "Voigtlander or Carl Zeiss Lens");
984 _lensTypeById.put(35, "Canon EF 35-80mm f/4-5.6");
985 _lensTypeById.put(36, "Canon EF 38-76mm f/4.5-5.6");
986 _lensTypeById.put(37, "Canon EF 35-80mm f/4-5.6 or Tamron Lens");
987 _lensTypeById.put(38, "Canon EF 80-200mm f/4.5-5.6");
988 _lensTypeById.put(39, "Canon EF 75-300mm f/4-5.6");
989 _lensTypeById.put(40, "Canon EF 28-80mm f/3.5-5.6");
990 _lensTypeById.put(41, "Canon EF 28-90mm f/4-5.6");
991 _lensTypeById.put(42, "Canon EF 28-200mm f/3.5-5.6 or Tamron Lens");
992 _lensTypeById.put(43, "Canon EF 28-105mm f/4-5.6");
993 _lensTypeById.put(44, "Canon EF 90-300mm f/4.5-5.6");
994 _lensTypeById.put(45, "Canon EF-S 18-55mm f/3.5-5.6 [II]");
995 _lensTypeById.put(46, "Canon EF 28-90mm f/4-5.6");
996 _lensTypeById.put(47, "Zeiss Milvus 35mm f/2 or 50mm f/2");
997 _lensTypeById.put(48, "Canon EF-S 18-55mm f/3.5-5.6 IS");
998 _lensTypeById.put(49, "Canon EF-S 55-250mm f/4-5.6 IS");
999 _lensTypeById.put(50, "Canon EF-S 18-200mm f/3.5-5.6 IS");
1000 _lensTypeById.put(51, "Canon EF-S 18-135mm f/3.5-5.6 IS");
1001 _lensTypeById.put(52, "Canon EF-S 18-55mm f/3.5-5.6 IS II");
1002 _lensTypeById.put(53, "Canon EF-S 18-55mm f/3.5-5.6 III");
1003 _lensTypeById.put(54, "Canon EF-S 55-250mm f/4-5.6 IS II");
1004 _lensTypeById.put(94, "Canon TS-E 17mm f/4L");
1005 _lensTypeById.put(95, "Canon TS-E 24.0mm f/3.5 L II");
1006 _lensTypeById.put(124, "Canon MP-E 65mm f/2.8 1-5x Macro Photo");
1007 _lensTypeById.put(125, "Canon TS-E 24mm f/3.5L");
1008 _lensTypeById.put(126, "Canon TS-E 45mm f/2.8");
1009 _lensTypeById.put(127, "Canon TS-E 90mm f/2.8");
1010 _lensTypeById.put(129, "Canon EF 300mm f/2.8L");
1011 _lensTypeById.put(130, "Canon EF 50mm f/1.0L");
1012 _lensTypeById.put(131, "Canon EF 28-80mm f/2.8-4L or Sigma Lens");
1013 _lensTypeById.put(132, "Canon EF 1200mm f/5.6L");
1014 _lensTypeById.put(134, "Canon EF 600mm f/4L IS");
1015 _lensTypeById.put(135, "Canon EF 200mm f/1.8L");
1016 _lensTypeById.put(136, "Canon EF 300mm f/2.8L");
1017 _lensTypeById.put(137, "Canon EF 85mm f/1.2L or Sigma or Tamron Lens");
1018 _lensTypeById.put(138, "Canon EF 28-80mm f/2.8-4L");
1019 _lensTypeById.put(139, "Canon EF 400mm f/2.8L");
1020 _lensTypeById.put(140, "Canon EF 500mm f/4.5L");
1021 _lensTypeById.put(141, "Canon EF 500mm f/4.5L");
1022 _lensTypeById.put(142, "Canon EF 300mm f/2.8L IS");
1023 _lensTypeById.put(143, "Canon EF 500mm f/4L IS or Sigma Lens");
1024 _lensTypeById.put(144, "Canon EF 35-135mm f/4-5.6 USM");
1025 _lensTypeById.put(145, "Canon EF 100-300mm f/4.5-5.6 USM");
1026 _lensTypeById.put(146, "Canon EF 70-210mm f/3.5-4.5 USM");
1027 _lensTypeById.put(147, "Canon EF 35-135mm f/4-5.6 USM");
1028 _lensTypeById.put(148, "Canon EF 28-80mm f/3.5-5.6 USM");
1029 _lensTypeById.put(149, "Canon EF 100mm f/2 USM");
1030 _lensTypeById.put(150, "Canon EF 14mm f/2.8L or Sigma Lens");
1031 _lensTypeById.put(151, "Canon EF 200mm f/2.8L");
1032 _lensTypeById.put(152, "Canon EF 300mm f/4L IS or Sigma Lens");
1033 _lensTypeById.put(153, "Canon EF 35-350mm f/3.5-5.6L or Sigma or Tamron Lens");
1034 _lensTypeById.put(154, "Canon EF 20mm f/2.8 USM or Zeiss Lens");
1035 _lensTypeById.put(155, "Canon EF 85mm f/1.8 USM");
1036 _lensTypeById.put(156, "Canon EF 28-105mm f/3.5-4.5 USM or Tamron Lens");
1037 _lensTypeById.put(160, "Canon EF 20-35mm f/3.5-4.5 USM or Tamron or Tokina Lens");
1038 _lensTypeById.put(161, "Canon EF 28-70mm f/2.8L or Sigma or Tamron Lens");
1039 _lensTypeById.put(162, "Canon EF 200mm f/2.8L");
1040 _lensTypeById.put(163, "Canon EF 300mm f/4L");
1041 _lensTypeById.put(164, "Canon EF 400mm f/5.6L");
1042 _lensTypeById.put(165, "Canon EF 70-200mm f/2.8 L");
1043 _lensTypeById.put(166, "Canon EF 70-200mm f/2.8 L + 1.4x");
1044 _lensTypeById.put(167, "Canon EF 70-200mm f/2.8 L + 2x");
1045 _lensTypeById.put(168, "Canon EF 28mm f/1.8 USM or Sigma Lens");
1046 _lensTypeById.put(169, "Canon EF 17-35mm f/2.8L or Sigma Lens");
1047 _lensTypeById.put(170, "Canon EF 200mm f/2.8L II");
1048 _lensTypeById.put(171, "Canon EF 300mm f/4L");
1049 _lensTypeById.put(172, "Canon EF 400mm f/5.6L or Sigma Lens");
1050 _lensTypeById.put(173, "Canon EF 180mm Macro f/3.5L or Sigma Lens");
1051 _lensTypeById.put(174, "Canon EF 135mm f/2L or Other Lens");
1052 _lensTypeById.put(175, "Canon EF 400mm f/2.8L");
1053 _lensTypeById.put(176, "Canon EF 24-85mm f/3.5-4.5 USM");
1054 _lensTypeById.put(177, "Canon EF 300mm f/4L IS");
1055 _lensTypeById.put(178, "Canon EF 28-135mm f/3.5-5.6 IS");
1056 _lensTypeById.put(179, "Canon EF 24mm f/1.4L");
1057 _lensTypeById.put(180, "Canon EF 35mm f/1.4L or Other Lens");
1058 _lensTypeById.put(181, "Canon EF 100-400mm f/4.5-5.6L IS + 1.4x or Sigma Lens");
1059 _lensTypeById.put(182, "Canon EF 100-400mm f/4.5-5.6L IS + 2x or Sigma Lens");
1060 _lensTypeById.put(183, "Canon EF 100-400mm f/4.5-5.6L IS or Sigma Lens");
1061 _lensTypeById.put(184, "Canon EF 400mm f/2.8L + 2x");
1062 _lensTypeById.put(185, "Canon EF 600mm f/4L IS");
1063 _lensTypeById.put(186, "Canon EF 70-200mm f/4L");
1064 _lensTypeById.put(187, "Canon EF 70-200mm f/4L + 1.4x");
1065 _lensTypeById.put(188, "Canon EF 70-200mm f/4L + 2x");
1066 _lensTypeById.put(189, "Canon EF 70-200mm f/4L + 2.8x");
1067 _lensTypeById.put(190, "Canon EF 100mm f/2.8 Macro USM");
1068 _lensTypeById.put(191, "Canon EF 400mm f/4 DO IS");
1069 _lensTypeById.put(193, "Canon EF 35-80mm f/4-5.6 USM");
1070 _lensTypeById.put(194, "Canon EF 80-200mm f/4.5-5.6 USM");
1071 _lensTypeById.put(195, "Canon EF 35-105mm f/4.5-5.6 USM");
1072 _lensTypeById.put(196, "Canon EF 75-300mm f/4-5.6 USM");
1073 _lensTypeById.put(197, "Canon EF 75-300mm f/4-5.6 IS USM");
1074 _lensTypeById.put(198, "Canon EF 50mm f/1.4 USM or Zeiss Lens");
1075 _lensTypeById.put(199, "Canon EF 28-80mm f/3.5-5.6 USM");
1076 _lensTypeById.put(200, "Canon EF 75-300mm f/4-5.6 USM");
1077 _lensTypeById.put(201, "Canon EF 28-80mm f/3.5-5.6 USM");
1078 _lensTypeById.put(202, "Canon EF 28-80mm f/3.5-5.6 USM IV");
1079 _lensTypeById.put(208, "Canon EF 22-55mm f/4-5.6 USM");
1080 _lensTypeById.put(209, "Canon EF 55-200mm f/4.5-5.6");
1081 _lensTypeById.put(210, "Canon EF 28-90mm f/4-5.6 USM");
1082 _lensTypeById.put(211, "Canon EF 28-200mm f/3.5-5.6 USM");
1083 _lensTypeById.put(212, "Canon EF 28-105mm f/4-5.6 USM");
1084 _lensTypeById.put(213, "Canon EF 90-300mm f/4.5-5.6 USM or Tamron Lens");
1085 _lensTypeById.put(214, "Canon EF-S 18-55mm f/3.5-5.6 USM");
1086 _lensTypeById.put(215, "Canon EF 55-200mm f/4.5-5.6 II USM");
1087 _lensTypeById.put(217, "Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD");
1088 _lensTypeById.put(224, "Canon EF 70-200mm f/2.8L IS");
1089 _lensTypeById.put(225, "Canon EF 70-200mm f/2.8L IS + 1.4x");
1090 _lensTypeById.put(226, "Canon EF 70-200mm f/2.8L IS + 2x");
1091 _lensTypeById.put(227, "Canon EF 70-200mm f/2.8L IS + 2.8x");
1092 _lensTypeById.put(228, "Canon EF 28-105mm f/3.5-4.5 USM");
1093 _lensTypeById.put(229, "Canon EF 16-35mm f/2.8L");
1094 _lensTypeById.put(230, "Canon EF 24-70mm f/2.8L");
1095 _lensTypeById.put(231, "Canon EF 17-40mm f/4L");
1096 _lensTypeById.put(232, "Canon EF 70-300mm f/4.5-5.6 DO IS USM");
1097 _lensTypeById.put(233, "Canon EF 28-300mm f/3.5-5.6L IS");
1098 _lensTypeById.put(234, "Canon EF-S 17-85mm f/4-5.6 IS USM or Tokina Lens");
1099 _lensTypeById.put(235, "Canon EF-S 10-22mm f/3.5-4.5 USM");
1100 _lensTypeById.put(236, "Canon EF-S 60mm f/2.8 Macro USM");
1101 _lensTypeById.put(237, "Canon EF 24-105mm f/4L IS");
1102 _lensTypeById.put(238, "Canon EF 70-300mm f/4-5.6 IS USM");
1103 _lensTypeById.put(239, "Canon EF 85mm f/1.2L II");
1104 _lensTypeById.put(240, "Canon EF-S 17-55mm f/2.8 IS USM");
1105 _lensTypeById.put(241, "Canon EF 50mm f/1.2L");
1106 _lensTypeById.put(242, "Canon EF 70-200mm f/4L IS");
1107 _lensTypeById.put(243, "Canon EF 70-200mm f/4L IS + 1.4x");
1108 _lensTypeById.put(244, "Canon EF 70-200mm f/4L IS + 2x");
1109 _lensTypeById.put(245, "Canon EF 70-200mm f/4L IS + 2.8x");
1110 _lensTypeById.put(246, "Canon EF 16-35mm f/2.8L II");
1111 _lensTypeById.put(247, "Canon EF 14mm f/2.8L II USM");
1112 _lensTypeById.put(248, "Canon EF 200mm f/2L IS or Sigma Lens");
1113 _lensTypeById.put(249, "Canon EF 800mm f/5.6L IS");
1114 _lensTypeById.put(250, "Canon EF 24mm f/1.4L II or Sigma Lens");
1115 _lensTypeById.put(251, "Canon EF 70-200mm f/2.8L IS II USM");
1116 _lensTypeById.put(252, "Canon EF 70-200mm f/2.8L IS II USM + 1.4x");
1117 _lensTypeById.put(253, "Canon EF 70-200mm f/2.8L IS II USM + 2x");
1118 _lensTypeById.put(254, "Canon EF 100mm f/2.8L Macro IS USM");
1119 _lensTypeById.put(255, "Sigma 24-105mm f/4 DG OS HSM | A or Other Sigma Lens");
1120 _lensTypeById.put(488, "Canon EF-S 15-85mm f/3.5-5.6 IS USM");
1121 _lensTypeById.put(489, "Canon EF 70-300mm f/4-5.6L IS USM");
1122 _lensTypeById.put(490, "Canon EF 8-15mm f/4L Fisheye USM");
1123 _lensTypeById.put(491, "Canon EF 300mm f/2.8L IS II USM");
1124 _lensTypeById.put(492, "Canon EF 400mm f/2.8L IS II USM");
1125 _lensTypeById.put(493, "Canon EF 500mm f/4L IS II USM or EF 24-105mm f4L IS USM");
1126 _lensTypeById.put(494, "Canon EF 600mm f/4.0L IS II USM");
1127 _lensTypeById.put(495, "Canon EF 24-70mm f/2.8L II USM");
1128 _lensTypeById.put(496, "Canon EF 200-400mm f/4L IS USM");
1129 _lensTypeById.put(499, "Canon EF 200-400mm f/4L IS USM + 1.4x");
1130 _lensTypeById.put(502, "Canon EF 28mm f/2.8 IS USM");
1131 _lensTypeById.put(503, "Canon EF 24mm f/2.8 IS USM");
1132 _lensTypeById.put(504, "Canon EF 24-70mm f/4L IS USM");
1133 _lensTypeById.put(505, "Canon EF 35mm f/2 IS USM");
1134 _lensTypeById.put(506, "Canon EF 400mm f/4 DO IS II USM");
1135 _lensTypeById.put(507, "Canon EF 16-35mm f/4L IS USM");
1136 _lensTypeById.put(508, "Canon EF 11-24mm f/4L USM");
1137 _lensTypeById.put(747, "Canon EF 100-400mm f/4.5-5.6L IS II USM");
1138 _lensTypeById.put(750, "Canon EF 35mm f/1.4L II USM");
1139 _lensTypeById.put(4142, "Canon EF-S 18-135mm f/3.5-5.6 IS STM");
1140 _lensTypeById.put(4143, "Canon EF-M 18-55mm f/3.5-5.6 IS STM or Tamron Lens");
1141 _lensTypeById.put(4144, "Canon EF 40mm f/2.8 STM");
1142 _lensTypeById.put(4145, "Canon EF-M 22mm f/2 STM");
1143 _lensTypeById.put(4146, "Canon EF-S 18-55mm f/3.5-5.6 IS STM");
1144 _lensTypeById.put(4147, "Canon EF-M 11-22mm f/4-5.6 IS STM");
1145 _lensTypeById.put(4148, "Canon EF-S 55-250mm f/4-5.6 IS STM");
1146 _lensTypeById.put(4149, "Canon EF-M 55-200mm f/4.5-6.3 IS STM");
1147 _lensTypeById.put(4150, "Canon EF-S 10-18mm f/4.5-5.6 IS STM");
1148 _lensTypeById.put(4152, "Canon EF 24-105mm f/3.5-5.6 IS STM");
1149 _lensTypeById.put(4153, "Canon EF-M 15-45mm f/3.5-6.3 IS STM");
1150 _lensTypeById.put(4154, "Canon EF-S 24mm f/2.8 STM");
1151 _lensTypeById.put(4156, "Canon EF 50mm f/1.8 STM");
1152 _lensTypeById.put(36912, "Canon EF-S 18-135mm f/3.5-5.6 IS USM");
1153 _lensTypeById.put(65535, "N/A");
1154 }
1155}
Note: See TracBrowser for help on using the repository browser.