| 1 | /*
|
|---|
| 2 | * Copyright 2002-2012 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 | * http://drewnoakes.com/code/exif/
|
|---|
| 19 | * http://code.google.com/p/metadata-extractor/
|
|---|
| 20 | */
|
|---|
| 21 | package com.drew.metadata.exif;
|
|---|
| 22 |
|
|---|
| 23 | import com.drew.lang.annotations.NotNull;
|
|---|
| 24 | import com.drew.metadata.Directory;
|
|---|
| 25 |
|
|---|
| 26 | import java.util.HashMap;
|
|---|
| 27 |
|
|---|
| 28 | /**
|
|---|
| 29 | * Describes tags specific to Canon cameras.
|
|---|
| 30 | *
|
|---|
| 31 | * Thanks to Bill Richards for his contribution to this makernote directory.
|
|---|
| 32 | *
|
|---|
| 33 | * Many tag definitions explained here: http://www.ozhiker.com/electronics/pjmt/jpeg_info/canon_mn.html
|
|---|
| 34 | *
|
|---|
| 35 | * @author Drew Noakes http://drewnoakes.com
|
|---|
| 36 | */
|
|---|
| 37 | public class CanonMakernoteDirectory extends Directory
|
|---|
| 38 | {
|
|---|
| 39 | // These TAG_*_ARRAY Exif tags map to arrays of int16 values which are split out into separate 'fake' tags.
|
|---|
| 40 | // When an attempt is made to set one of these on the directory, it is split and the corresponding offset added to the tagType.
|
|---|
| 41 | // So the resulting tag is the offset + the index into the array.
|
|---|
| 42 |
|
|---|
| 43 | private static final int TAG_CAMERA_SETTINGS_ARRAY = 0x0001;
|
|---|
| 44 | private static final int TAG_FOCAL_LENGTH_ARRAY = 0x0002;
|
|---|
| 45 | private static final int TAG_SHOT_INFO_ARRAY = 0x0004;
|
|---|
| 46 | private static final int TAG_PANORAMA_ARRAY = 0x0005;
|
|---|
| 47 |
|
|---|
| 48 | public static final int TAG_CANON_IMAGE_TYPE = 0x0006;
|
|---|
| 49 | public static final int TAG_CANON_FIRMWARE_VERSION = 0x0007;
|
|---|
| 50 | public static final int TAG_CANON_IMAGE_NUMBER = 0x0008;
|
|---|
| 51 | public static final int TAG_CANON_OWNER_NAME = 0x0009;
|
|---|
| 52 | public static final int TAG_CANON_SERIAL_NUMBER = 0x000C;
|
|---|
| 53 | public static final int TAG_CAMERA_INFO_ARRAY = 0x000D; // depends upon model, so leave for now
|
|---|
| 54 | public static final int TAG_CANON_FILE_LENGTH = 0x000E;
|
|---|
| 55 | public static final int TAG_CANON_CUSTOM_FUNCTIONS_ARRAY = 0x000F; // depends upon model, so leave for now
|
|---|
| 56 | public static final int TAG_MODEL_ID = 0x0010;
|
|---|
| 57 | public static final int TAG_MOVIE_INFO_ARRAY = 0x0011; // not currently decoded as not sure we see it in still images
|
|---|
| 58 | private static final int TAG_AF_INFO_ARRAY = 0x0012; // not currently decoded
|
|---|
| 59 | public static final int TAG_THUMBNAIL_IMAGE_VALID_AREA = 0x0013;
|
|---|
| 60 | public static final int TAG_SERIAL_NUMBER_FORMAT = 0x0015;
|
|---|
| 61 | public static final int TAG_SUPER_MACRO = 0x001A;
|
|---|
| 62 | public static final int TAG_DATE_STAMP_MODE = 0x001C;
|
|---|
| 63 | public static final int TAG_MY_COLORS = 0x001D;
|
|---|
| 64 | public static final int TAG_FIRMWARE_REVISION = 0x001E;
|
|---|
| 65 | public static final int TAG_CATEGORIES = 0x0023;
|
|---|
| 66 | public static final int TAG_FACE_DETECT_ARRAY_1 = 0x0024;
|
|---|
| 67 | public static final int TAG_FACE_DETECT_ARRAY_2 = 0x0025;
|
|---|
| 68 | public static final int TAG_AF_INFO_ARRAY_2 = 0x0026;
|
|---|
| 69 | public static final int TAG_IMAGE_UNIQUE_ID = 0x0028;
|
|---|
| 70 | public static final int TAG_RAW_DATA_OFFSET = 0x0081;
|
|---|
| 71 | public static final int TAG_ORIGINAL_DECISION_DATA_OFFSET = 0x0083;
|
|---|
| 72 | public static final int TAG_CUSTOM_FUNCTIONS_1D_ARRAY = 0x0090; // not currently decoded
|
|---|
| 73 | public static final int TAG_PERSONAL_FUNCTIONS_ARRAY = 0x0091; // not currently decoded
|
|---|
| 74 | public static final int TAG_PERSONAL_FUNCTION_VALUES_ARRAY = 0x0092; // not currently decoded
|
|---|
| 75 | public static final int TAG_FILE_INFO_ARRAY = 0x0093; // not currently decoded
|
|---|
| 76 | public static final int TAG_AF_POINTS_IN_FOCUS_1D = 0x0094;
|
|---|
| 77 | public static final int TAG_LENS_MODEL = 0x0095;
|
|---|
| 78 | public static final int TAG_SERIAL_INFO_ARRAY = 0x0096; // not currently decoded
|
|---|
| 79 | public static final int TAG_DUST_REMOVAL_DATA = 0x0097;
|
|---|
| 80 | public static final int TAG_CROP_INFO = 0x0098; // not currently decoded
|
|---|
| 81 | public static final int TAG_CUSTOM_FUNCTIONS_ARRAY_2 = 0x0099; // not currently decoded
|
|---|
| 82 | public static final int TAG_ASPECT_INFO_ARRAY = 0x009A; // not currently decoded
|
|---|
| 83 | public static final int TAG_PROCESSING_INFO_ARRAY = 0x00A0; // not currently decoded
|
|---|
| 84 | public static final int TAG_TONE_CURVE_TABLE = 0x00A1;
|
|---|
| 85 | public static final int TAG_SHARPNESS_TABLE = 0x00A2;
|
|---|
| 86 | public static final int TAG_SHARPNESS_FREQ_TABLE = 0x00A3;
|
|---|
| 87 | public static final int TAG_WHITE_BALANCE_TABLE = 0x00A4;
|
|---|
| 88 | public static final int TAG_COLOR_BALANCE_ARRAY = 0x00A9; // not currently decoded
|
|---|
| 89 | public static final int TAG_MEASURED_COLOR_ARRAY = 0x00AA; // not currently decoded
|
|---|
| 90 | public static final int TAG_COLOR_TEMPERATURE = 0x00AE;
|
|---|
| 91 | public static final int TAG_CANON_FLAGS_ARRAY = 0x00B0; // not currently decoded
|
|---|
| 92 | public static final int TAG_MODIFIED_INFO_ARRAY = 0x00B1; // not currently decoded
|
|---|
| 93 | public static final int TAG_TONE_CURVE_MATCHING = 0x00B2;
|
|---|
| 94 | public static final int TAG_WHITE_BALANCE_MATCHING = 0x00B3;
|
|---|
| 95 | public static final int TAG_COLOR_SPACE = 0x00B4;
|
|---|
| 96 | public static final int TAG_PREVIEW_IMAGE_INFO_ARRAY = 0x00B6; // not currently decoded
|
|---|
| 97 | public static final int TAG_VRD_OFFSET = 0x00D0;
|
|---|
| 98 | public static final int TAG_SENSOR_INFO_ARRAY = 0x00E0; // not currently decoded
|
|---|
| 99 | public static final int TAG_COLOR_DATA_ARRAY_2 = 0x4001; // depends upon camera model, not currently decoded
|
|---|
| 100 | public static final int TAG_COLOR_INFO_ARRAY_2 = 0x4003; // not currently decoded
|
|---|
| 101 | public static final int TAG_CUSTOM_PICTURE_STYLE_FILE_NAME = 0x4010;
|
|---|
| 102 | public static final int TAG_COLOR_INFO_ARRAY = 0x4013; // not currently decoded
|
|---|
| 103 | public static final int TAG_VIGNETTING_CORRECTION_ARRAY_1 = 0x4015; // not currently decoded
|
|---|
| 104 | public static final int TAG_VIGNETTING_CORRECTION_ARRAY_2 = 0x4016; // not currently decoded
|
|---|
| 105 | public static final int TAG_LIGHTING_OPTIMIZER_ARRAY = 0x4018; // not currently decoded
|
|---|
| 106 | public static final int TAG_LENS_INFO_ARRAY = 0x4019; // not currently decoded
|
|---|
| 107 | public static final int TAG_AMBIANCE_INFO_ARRAY = 0x4020; // not currently decoded
|
|---|
| 108 | public static final int TAG_FILTER_INFO_ARRAY = 0x4024; // not currently decoded
|
|---|
| 109 |
|
|---|
| 110 | public final static class CameraSettings
|
|---|
| 111 | {
|
|---|
| 112 | // These 'sub'-tag values have been created for consistency -- they don't exist within the exif segment
|
|---|
| 113 | private static final int OFFSET = 0xC100;
|
|---|
| 114 |
|
|---|
| 115 | /**
|
|---|
| 116 | * 1 = Macro
|
|---|
| 117 | * 2 = Normal
|
|---|
| 118 | */
|
|---|
| 119 | public static final int TAG_MACRO_MODE = OFFSET + 0x01;
|
|---|
| 120 | public static final int TAG_SELF_TIMER_DELAY = OFFSET + 0x02;
|
|---|
| 121 | /**
|
|---|
| 122 | * 2 = Normal
|
|---|
| 123 | * 3 = Fine
|
|---|
| 124 | * 5 = Superfine
|
|---|
| 125 | */
|
|---|
| 126 | public static final int TAG_QUALITY = OFFSET + 0x03;
|
|---|
| 127 | /**
|
|---|
| 128 | * 0 = Flash Not Fired
|
|---|
| 129 | * 1 = Auto
|
|---|
| 130 | * 2 = On
|
|---|
| 131 | * 3 = Red Eye Reduction
|
|---|
| 132 | * 4 = Slow Synchro
|
|---|
| 133 | * 5 = Auto + Red Eye Reduction
|
|---|
| 134 | * 6 = On + Red Eye Reduction
|
|---|
| 135 | * 16 = External Flash
|
|---|
| 136 | */
|
|---|
| 137 | public static final int TAG_FLASH_MODE = OFFSET + 0x04;
|
|---|
| 138 | /**
|
|---|
| 139 | * 0 = Single Frame or Timer Mode
|
|---|
| 140 | * 1 = Continuous
|
|---|
| 141 | */
|
|---|
| 142 | public static final int TAG_CONTINUOUS_DRIVE_MODE = OFFSET + 0x05;
|
|---|
| 143 | public static final int TAG_UNKNOWN_2 = OFFSET + 0x06;
|
|---|
| 144 | /**
|
|---|
| 145 | * 0 = One-Shot
|
|---|
| 146 | * 1 = AI Servo
|
|---|
| 147 | * 2 = AI Focus
|
|---|
| 148 | * 3 = Manual Focus
|
|---|
| 149 | * 4 = Single
|
|---|
| 150 | * 5 = Continuous
|
|---|
| 151 | * 6 = Manual Focus
|
|---|
| 152 | */
|
|---|
| 153 | public static final int TAG_FOCUS_MODE_1 = OFFSET + 0x07;
|
|---|
| 154 | public static final int TAG_UNKNOWN_3 = OFFSET + 0x08;
|
|---|
| 155 | public static final int TAG_UNKNOWN_4 = OFFSET + 0x09;
|
|---|
| 156 | /**
|
|---|
| 157 | * 0 = Large
|
|---|
| 158 | * 1 = Medium
|
|---|
| 159 | * 2 = Small
|
|---|
| 160 | */
|
|---|
| 161 | public static final int TAG_IMAGE_SIZE = OFFSET + 0x0A;
|
|---|
| 162 | /**
|
|---|
| 163 | * 0 = Full Auto
|
|---|
| 164 | * 1 = Manual
|
|---|
| 165 | * 2 = Landscape
|
|---|
| 166 | * 3 = Fast Shutter
|
|---|
| 167 | * 4 = Slow Shutter
|
|---|
| 168 | * 5 = Night
|
|---|
| 169 | * 6 = Black & White
|
|---|
| 170 | * 7 = Sepia
|
|---|
| 171 | * 8 = Portrait
|
|---|
| 172 | * 9 = Sports
|
|---|
| 173 | * 10 = Macro / Close-Up
|
|---|
| 174 | * 11 = Pan Focus
|
|---|
| 175 | */
|
|---|
| 176 | public static final int TAG_EASY_SHOOTING_MODE = OFFSET + 0x0B;
|
|---|
| 177 | /**
|
|---|
| 178 | * 0 = No Digital Zoom
|
|---|
| 179 | * 1 = 2x
|
|---|
| 180 | * 2 = 4x
|
|---|
| 181 | */
|
|---|
| 182 | public static final int TAG_DIGITAL_ZOOM = OFFSET + 0x0C;
|
|---|
| 183 | /**
|
|---|
| 184 | * 0 = Normal
|
|---|
| 185 | * 1 = High
|
|---|
| 186 | * 65535 = Low
|
|---|
| 187 | */
|
|---|
| 188 | public static final int TAG_CONTRAST = OFFSET + 0x0D;
|
|---|
| 189 | /**
|
|---|
| 190 | * 0 = Normal
|
|---|
| 191 | * 1 = High
|
|---|
| 192 | * 65535 = Low
|
|---|
| 193 | */
|
|---|
| 194 | public static final int TAG_SATURATION = OFFSET + 0x0E;
|
|---|
| 195 | /**
|
|---|
| 196 | * 0 = Normal
|
|---|
| 197 | * 1 = High
|
|---|
| 198 | * 65535 = Low
|
|---|
| 199 | */
|
|---|
| 200 | public static final int TAG_SHARPNESS = OFFSET + 0x0F;
|
|---|
| 201 | /**
|
|---|
| 202 | * 0 = Check ISOSpeedRatings EXIF tag for ISO Speed
|
|---|
| 203 | * 15 = Auto ISO
|
|---|
| 204 | * 16 = ISO 50
|
|---|
| 205 | * 17 = ISO 100
|
|---|
| 206 | * 18 = ISO 200
|
|---|
| 207 | * 19 = ISO 400
|
|---|
| 208 | */
|
|---|
| 209 | public static final int TAG_ISO = OFFSET + 0x10;
|
|---|
| 210 | /**
|
|---|
| 211 | * 3 = Evaluative
|
|---|
| 212 | * 4 = Partial
|
|---|
| 213 | * 5 = Centre Weighted
|
|---|
| 214 | */
|
|---|
| 215 | public static final int TAG_METERING_MODE = OFFSET + 0x11;
|
|---|
| 216 | /**
|
|---|
| 217 | * 0 = Manual
|
|---|
| 218 | * 1 = Auto
|
|---|
| 219 | * 3 = Close-up (Macro)
|
|---|
| 220 | * 8 = Locked (Pan Mode)
|
|---|
| 221 | */
|
|---|
| 222 | public static final int TAG_FOCUS_TYPE = OFFSET + 0x12;
|
|---|
| 223 | /**
|
|---|
| 224 | * 12288 = None (Manual Focus)
|
|---|
| 225 | * 12289 = Auto Selected
|
|---|
| 226 | * 12290 = Right
|
|---|
| 227 | * 12291 = Centre
|
|---|
| 228 | * 12292 = Left
|
|---|
| 229 | */
|
|---|
| 230 | public static final int TAG_AF_POINT_SELECTED = OFFSET + 0x13;
|
|---|
| 231 | /**
|
|---|
| 232 | * 0 = Easy Shooting (See Easy Shooting Mode)
|
|---|
| 233 | * 1 = Program
|
|---|
| 234 | * 2 = Tv-Priority
|
|---|
| 235 | * 3 = Av-Priority
|
|---|
| 236 | * 4 = Manual
|
|---|
| 237 | * 5 = A-DEP
|
|---|
| 238 | */
|
|---|
| 239 | public static final int TAG_EXPOSURE_MODE = OFFSET + 0x14;
|
|---|
| 240 | public static final int TAG_UNKNOWN_7 = OFFSET + 0x15;
|
|---|
| 241 | public static final int TAG_UNKNOWN_8 = OFFSET + 0x16;
|
|---|
| 242 | public static final int TAG_LONG_FOCAL_LENGTH = OFFSET + 0x17;
|
|---|
| 243 | public static final int TAG_SHORT_FOCAL_LENGTH = OFFSET + 0x18;
|
|---|
| 244 | public static final int TAG_FOCAL_UNITS_PER_MM = OFFSET + 0x19;
|
|---|
| 245 | public static final int TAG_UNKNOWN_9 = OFFSET + 0x1A;
|
|---|
| 246 | public static final int TAG_UNKNOWN_10 = OFFSET + 0x1B;
|
|---|
| 247 | /**
|
|---|
| 248 | * 0 = Flash Did Not Fire
|
|---|
| 249 | * 1 = Flash Fired
|
|---|
| 250 | */
|
|---|
| 251 | public static final int TAG_FLASH_ACTIVITY = OFFSET + 0x1C;
|
|---|
| 252 | public static final int TAG_FLASH_DETAILS = OFFSET + 0x1D;
|
|---|
| 253 | public static final int TAG_UNKNOWN_12 = OFFSET + 0x1E;
|
|---|
| 254 | public static final int TAG_UNKNOWN_13 = OFFSET + 0x1F;
|
|---|
| 255 | /**
|
|---|
| 256 | * 0 = Focus Mode: Single
|
|---|
| 257 | * 1 = Focus Mode: Continuous
|
|---|
| 258 | */
|
|---|
| 259 | public static final int TAG_FOCUS_MODE_2 = OFFSET + 0x20;
|
|---|
| 260 | }
|
|---|
| 261 |
|
|---|
| 262 | public final static class FocalLength
|
|---|
| 263 | {
|
|---|
| 264 | // These 'sub'-tag values have been created for consistency -- they don't exist within the exif segment
|
|---|
| 265 |
|
|---|
| 266 | private static final int OFFSET = 0xC200;
|
|---|
| 267 |
|
|---|
| 268 | /**
|
|---|
| 269 | * 0 = Auto
|
|---|
| 270 | * 1 = Sunny
|
|---|
| 271 | * 2 = Cloudy
|
|---|
| 272 | * 3 = Tungsten
|
|---|
| 273 | * 4 = Florescent
|
|---|
| 274 | * 5 = Flash
|
|---|
| 275 | * 6 = Custom
|
|---|
| 276 | */
|
|---|
| 277 | public static final int TAG_WHITE_BALANCE = OFFSET + 0x07;
|
|---|
| 278 | public static final int TAG_SEQUENCE_NUMBER = OFFSET + 0x09;
|
|---|
| 279 | public static final int TAG_AF_POINT_USED = OFFSET + 0x0E;
|
|---|
| 280 | /**
|
|---|
| 281 | * The value of this tag may be translated into a flash bias value, in EV.
|
|---|
| 282 | *
|
|---|
| 283 | * 0xffc0 = -2 EV
|
|---|
| 284 | * 0xffcc = -1.67 EV
|
|---|
| 285 | * 0xffd0 = -1.5 EV
|
|---|
| 286 | * 0xffd4 = -1.33 EV
|
|---|
| 287 | * 0xffe0 = -1 EV
|
|---|
| 288 | * 0xffec = -0.67 EV
|
|---|
| 289 | * 0xfff0 = -0.5 EV
|
|---|
| 290 | * 0xfff4 = -0.33 EV
|
|---|
| 291 | * 0x0000 = 0 EV
|
|---|
| 292 | * 0x000c = 0.33 EV
|
|---|
| 293 | * 0x0010 = 0.5 EV
|
|---|
| 294 | * 0x0014 = 0.67 EV
|
|---|
| 295 | * 0x0020 = 1 EV
|
|---|
| 296 | * 0x002c = 1.33 EV
|
|---|
| 297 | * 0x0030 = 1.5 EV
|
|---|
| 298 | * 0x0034 = 1.67 EV
|
|---|
| 299 | * 0x0040 = 2 EV
|
|---|
| 300 | */
|
|---|
| 301 | public static final int TAG_FLASH_BIAS = OFFSET + 0x0F;
|
|---|
| 302 | public static final int TAG_AUTO_EXPOSURE_BRACKETING = OFFSET + 0x10;
|
|---|
| 303 | public static final int TAG_AEB_BRACKET_VALUE = OFFSET + 0x11;
|
|---|
| 304 | public static final int TAG_SUBJECT_DISTANCE = OFFSET + 0x13;
|
|---|
| 305 | }
|
|---|
| 306 |
|
|---|
| 307 | public final static class ShotInfo
|
|---|
| 308 | {
|
|---|
| 309 | // These 'sub'-tag values have been created for consistency -- they don't exist within the exif segment
|
|---|
| 310 |
|
|---|
| 311 | private static final int OFFSET = 0xC400;
|
|---|
| 312 |
|
|---|
| 313 | public static final int TAG_AUTO_ISO = OFFSET + 1;
|
|---|
| 314 | public static final int TAG_BASE_ISO = OFFSET + 2;
|
|---|
| 315 | public static final int TAG_MEASURED_EV = OFFSET + 3;
|
|---|
| 316 | public static final int TAG_TARGET_APERTURE = OFFSET + 4;
|
|---|
| 317 | public static final int TAG_TARGET_EXPOSURE_TIME = OFFSET + 5;
|
|---|
| 318 | public static final int TAG_EXPOSURE_COMPENSATION = OFFSET + 6;
|
|---|
| 319 | public static final int TAG_WHITE_BALANCE = OFFSET + 7;
|
|---|
| 320 | public static final int TAG_SLOW_SHUTTER = OFFSET + 8;
|
|---|
| 321 | public static final int TAG_SEQUENCE_NUMBER = OFFSET + 9;
|
|---|
| 322 | public static final int TAG_OPTICAL_ZOOM_CODE = OFFSET + 10;
|
|---|
| 323 | public static final int TAG_CAMERA_TEMPERATURE = OFFSET + 12;
|
|---|
| 324 | public static final int TAG_FLASH_GUIDE_NUMBER = OFFSET + 13;
|
|---|
| 325 | public static final int TAG_AF_POINTS_IN_FOCUS = OFFSET + 14;
|
|---|
| 326 | public static final int TAG_FLASH_EXPOSURE_BRACKETING = OFFSET + 15;
|
|---|
| 327 | public static final int TAG_AUTO_EXPOSURE_BRACKETING = OFFSET + 16;
|
|---|
| 328 | public static final int TAG_AEB_BRACKET_VALUE = OFFSET + 17;
|
|---|
| 329 | public static final int TAG_CONTROL_MODE = OFFSET + 18;
|
|---|
| 330 | public static final int TAG_FOCUS_DISTANCE_UPPER = OFFSET + 19;
|
|---|
| 331 | public static final int TAG_FOCUS_DISTANCE_LOWER = OFFSET + 20;
|
|---|
| 332 | public static final int TAG_F_NUMBER = OFFSET + 21;
|
|---|
| 333 | public static final int TAG_EXPOSURE_TIME = OFFSET + 22;
|
|---|
| 334 | public static final int TAG_MEASURED_EV_2 = OFFSET + 23;
|
|---|
| 335 | public static final int TAG_BULB_DURATION = OFFSET + 24;
|
|---|
| 336 | public static final int TAG_CAMERA_TYPE = OFFSET + 26;
|
|---|
| 337 | public static final int TAG_AUTO_ROTATE = OFFSET + 27;
|
|---|
| 338 | public static final int TAG_ND_FILTER = OFFSET + 28;
|
|---|
| 339 | public static final int TAG_SELF_TIMER_2 = OFFSET + 29;
|
|---|
| 340 | public static final int TAG_FLASH_OUTPUT = OFFSET + 33;
|
|---|
| 341 | }
|
|---|
| 342 |
|
|---|
| 343 | public final static class Panorama
|
|---|
| 344 | {
|
|---|
| 345 | // These 'sub'-tag values have been created for consistency -- they don't exist within the exif segment
|
|---|
| 346 |
|
|---|
| 347 | private static final int OFFSET = 0xC500;
|
|---|
| 348 |
|
|---|
| 349 | public static final int TAG_PANORAMA_FRAME_NUMBER = OFFSET + 2;
|
|---|
| 350 | public static final int TAG_PANORAMA_DIRECTION = OFFSET + 5;
|
|---|
| 351 | }
|
|---|
| 352 |
|
|---|
| 353 | public final static class AFInfo
|
|---|
| 354 | {
|
|---|
| 355 | // These 'sub'-tag values have been created for consistency -- they don't exist within the exif segment
|
|---|
| 356 |
|
|---|
| 357 | private static final int OFFSET = 0xD200;
|
|---|
| 358 |
|
|---|
| 359 | public static final int TAG_NUM_AF_POINTS = OFFSET;
|
|---|
| 360 | public static final int TAG_VALID_AF_POINTS = OFFSET + 1;
|
|---|
| 361 | public static final int TAG_IMAGE_WIDTH = OFFSET + 2;
|
|---|
| 362 | public static final int TAG_IMAGE_HEIGHT = OFFSET + 3;
|
|---|
| 363 | public static final int TAG_AF_IMAGE_WIDTH = OFFSET + 4;
|
|---|
| 364 | public static final int TAG_AF_IMAGE_HEIGHT = OFFSET + 5;
|
|---|
| 365 | public static final int TAG_AF_AREA_WIDTH = OFFSET + 6;
|
|---|
| 366 | public static final int TAG_AF_AREA_HEIGHT = OFFSET + 7;
|
|---|
| 367 | public static final int TAG_AF_AREA_X_POSITIONS = OFFSET + 8;
|
|---|
| 368 | public static final int TAG_AF_AREA_Y_POSITIONS = OFFSET + 9;
|
|---|
| 369 | public static final int TAG_AF_POINTS_IN_FOCUS = OFFSET + 10;
|
|---|
| 370 | public static final int TAG_PRIMARY_AF_POINT_1 = OFFSET + 11;
|
|---|
| 371 | public static final int TAG_PRIMARY_AF_POINT_2 = OFFSET + 12; // not sure why there are two of these
|
|---|
| 372 | }
|
|---|
| 373 |
|
|---|
| 374 | // /**
|
|---|
| 375 | // * Long Exposure Noise Reduction
|
|---|
| 376 | // * 0 = Off
|
|---|
| 377 | // * 1 = On
|
|---|
| 378 | // */
|
|---|
| 379 | // public static final int TAG_CANON_CUSTOM_FUNCTION_LONG_EXPOSURE_NOISE_REDUCTION = 0xC301;
|
|---|
| 380 | //
|
|---|
| 381 | // /**
|
|---|
| 382 | // * Shutter/Auto Exposure-lock buttons
|
|---|
| 383 | // * 0 = AF/AE lock
|
|---|
| 384 | // * 1 = AE lock/AF
|
|---|
| 385 | // * 2 = AF/AF lock
|
|---|
| 386 | // * 3 = AE+release/AE+AF
|
|---|
| 387 | // */
|
|---|
| 388 | // public static final int TAG_CANON_CUSTOM_FUNCTION_SHUTTER_AUTO_EXPOSURE_LOCK_BUTTONS = 0xC302;
|
|---|
| 389 | //
|
|---|
| 390 | // /**
|
|---|
| 391 | // * Mirror lockup
|
|---|
| 392 | // * 0 = Disable
|
|---|
| 393 | // * 1 = Enable
|
|---|
| 394 | // */
|
|---|
| 395 | // public static final int TAG_CANON_CUSTOM_FUNCTION_MIRROR_LOCKUP = 0xC303;
|
|---|
| 396 | //
|
|---|
| 397 | // /**
|
|---|
| 398 | // * Tv/Av and exposure level
|
|---|
| 399 | // * 0 = 1/2 stop
|
|---|
| 400 | // * 1 = 1/3 stop
|
|---|
| 401 | // */
|
|---|
| 402 | // public static final int TAG_CANON_CUSTOM_FUNCTION_TV_AV_AND_EXPOSURE_LEVEL = 0xC304;
|
|---|
| 403 | //
|
|---|
| 404 | // /**
|
|---|
| 405 | // * AF-assist light
|
|---|
| 406 | // * 0 = On (Auto)
|
|---|
| 407 | // * 1 = Off
|
|---|
| 408 | // */
|
|---|
| 409 | // public static final int TAG_CANON_CUSTOM_FUNCTION_AF_ASSIST_LIGHT = 0xC305;
|
|---|
| 410 | //
|
|---|
| 411 | // /**
|
|---|
| 412 | // * Shutter speed in Av mode
|
|---|
| 413 | // * 0 = Automatic
|
|---|
| 414 | // * 1 = 1/200 (fixed)
|
|---|
| 415 | // */
|
|---|
| 416 | // public static final int TAG_CANON_CUSTOM_FUNCTION_SHUTTER_SPEED_IN_AV_MODE = 0xC306;
|
|---|
| 417 | //
|
|---|
| 418 | // /**
|
|---|
| 419 | // * Auto-Exposure Bracketting sequence/auto cancellation
|
|---|
| 420 | // * 0 = 0,-,+ / Enabled
|
|---|
| 421 | // * 1 = 0,-,+ / Disabled
|
|---|
| 422 | // * 2 = -,0,+ / Enabled
|
|---|
| 423 | // * 3 = -,0,+ / Disabled
|
|---|
| 424 | // */
|
|---|
| 425 | // public static final int TAG_CANON_CUSTOM_FUNCTION_BRACKETTING = 0xC307;
|
|---|
| 426 | //
|
|---|
| 427 | // /**
|
|---|
| 428 | // * Shutter Curtain Sync
|
|---|
| 429 | // * 0 = 1st Curtain Sync
|
|---|
| 430 | // * 1 = 2nd Curtain Sync
|
|---|
| 431 | // */
|
|---|
| 432 | // public static final int TAG_CANON_CUSTOM_FUNCTION_SHUTTER_CURTAIN_SYNC = 0xC308;
|
|---|
| 433 | //
|
|---|
| 434 | // /**
|
|---|
| 435 | // * Lens Auto-Focus stop button Function Switch
|
|---|
| 436 | // * 0 = AF stop
|
|---|
| 437 | // * 1 = Operate AF
|
|---|
| 438 | // * 2 = Lock AE and start timer
|
|---|
| 439 | // */
|
|---|
| 440 | // public static final int TAG_CANON_CUSTOM_FUNCTION_AF_STOP = 0xC309;
|
|---|
| 441 | //
|
|---|
| 442 | // /**
|
|---|
| 443 | // * Auto reduction of fill flash
|
|---|
| 444 | // * 0 = Enable
|
|---|
| 445 | // * 1 = Disable
|
|---|
| 446 | // */
|
|---|
| 447 | // public static final int TAG_CANON_CUSTOM_FUNCTION_FILL_FLASH_REDUCTION = 0xC30A;
|
|---|
| 448 | //
|
|---|
| 449 | // /**
|
|---|
| 450 | // * Menu button return position
|
|---|
| 451 | // * 0 = Top
|
|---|
| 452 | // * 1 = Previous (volatile)
|
|---|
| 453 | // * 2 = Previous
|
|---|
| 454 | // */
|
|---|
| 455 | // public static final int TAG_CANON_CUSTOM_FUNCTION_MENU_BUTTON_RETURN = 0xC30B;
|
|---|
| 456 | //
|
|---|
| 457 | // /**
|
|---|
| 458 | // * SET button function when shooting
|
|---|
| 459 | // * 0 = Not Assigned
|
|---|
| 460 | // * 1 = Change Quality
|
|---|
| 461 | // * 2 = Change ISO Speed
|
|---|
| 462 | // * 3 = Select Parameters
|
|---|
| 463 | // */
|
|---|
| 464 | // public static final int TAG_CANON_CUSTOM_FUNCTION_SET_BUTTON_FUNCTION = 0xC30C;
|
|---|
| 465 | //
|
|---|
| 466 | // /**
|
|---|
| 467 | // * Sensor cleaning
|
|---|
| 468 | // * 0 = Disable
|
|---|
| 469 | // * 1 = Enable
|
|---|
| 470 | // */
|
|---|
| 471 | // public static final int TAG_CANON_CUSTOM_FUNCTION_SENSOR_CLEANING = 0xC30D;
|
|---|
| 472 |
|
|---|
| 473 | // 9 A B C D E F 10 11 12 13
|
|---|
| 474 | // 9 10 11 12 13 14 15 16 17 18 19
|
|---|
| 475 | @NotNull
|
|---|
| 476 | protected static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
|
|---|
| 477 |
|
|---|
| 478 | static
|
|---|
| 479 | {
|
|---|
| 480 | _tagNameMap.put(TAG_CANON_FIRMWARE_VERSION, "Firmware Version");
|
|---|
| 481 | _tagNameMap.put(TAG_CANON_IMAGE_NUMBER, "Image Number");
|
|---|
| 482 | _tagNameMap.put(TAG_CANON_IMAGE_TYPE, "Image Type");
|
|---|
| 483 | _tagNameMap.put(TAG_CANON_OWNER_NAME, "Owner Name");
|
|---|
| 484 | _tagNameMap.put(TAG_CANON_SERIAL_NUMBER, "Camera Serial Number");
|
|---|
| 485 | _tagNameMap.put(TAG_CAMERA_INFO_ARRAY, "Camera Info Array");
|
|---|
| 486 | _tagNameMap.put(TAG_CANON_FILE_LENGTH, "File Length");
|
|---|
| 487 | _tagNameMap.put(TAG_CANON_CUSTOM_FUNCTIONS_ARRAY, "Custom Functions");
|
|---|
| 488 | _tagNameMap.put(TAG_MODEL_ID, "Canon Model ID");
|
|---|
| 489 | _tagNameMap.put(TAG_MOVIE_INFO_ARRAY, "Movie Info Array");
|
|---|
| 490 |
|
|---|
| 491 | _tagNameMap.put(CameraSettings.TAG_AF_POINT_SELECTED, "AF Point Selected");
|
|---|
| 492 | _tagNameMap.put(CameraSettings.TAG_CONTINUOUS_DRIVE_MODE, "Continuous Drive Mode");
|
|---|
| 493 | _tagNameMap.put(CameraSettings.TAG_CONTRAST, "Contrast");
|
|---|
| 494 | _tagNameMap.put(CameraSettings.TAG_EASY_SHOOTING_MODE, "Easy Shooting Mode");
|
|---|
| 495 | _tagNameMap.put(CameraSettings.TAG_EXPOSURE_MODE, "Exposure Mode");
|
|---|
| 496 | _tagNameMap.put(CameraSettings.TAG_FLASH_DETAILS, "Flash Details");
|
|---|
| 497 | _tagNameMap.put(CameraSettings.TAG_FLASH_MODE, "Flash Mode");
|
|---|
| 498 | _tagNameMap.put(CameraSettings.TAG_FOCAL_UNITS_PER_MM, "Focal Units per mm");
|
|---|
| 499 | _tagNameMap.put(CameraSettings.TAG_FOCUS_MODE_1, "Focus Mode");
|
|---|
| 500 | _tagNameMap.put(CameraSettings.TAG_FOCUS_MODE_2, "Focus Mode");
|
|---|
| 501 | _tagNameMap.put(CameraSettings.TAG_IMAGE_SIZE, "Image Size");
|
|---|
| 502 | _tagNameMap.put(CameraSettings.TAG_ISO, "Iso");
|
|---|
| 503 | _tagNameMap.put(CameraSettings.TAG_LONG_FOCAL_LENGTH, "Long Focal Length");
|
|---|
| 504 | _tagNameMap.put(CameraSettings.TAG_MACRO_MODE, "Macro Mode");
|
|---|
| 505 | _tagNameMap.put(CameraSettings.TAG_METERING_MODE, "Metering Mode");
|
|---|
| 506 | _tagNameMap.put(CameraSettings.TAG_SATURATION, "Saturation");
|
|---|
| 507 | _tagNameMap.put(CameraSettings.TAG_SELF_TIMER_DELAY, "Self Timer Delay");
|
|---|
| 508 | _tagNameMap.put(CameraSettings.TAG_SHARPNESS, "Sharpness");
|
|---|
| 509 | _tagNameMap.put(CameraSettings.TAG_SHORT_FOCAL_LENGTH, "Short Focal Length");
|
|---|
| 510 | _tagNameMap.put(CameraSettings.TAG_QUALITY, "Quality");
|
|---|
| 511 | _tagNameMap.put(CameraSettings.TAG_UNKNOWN_2, "Unknown Camera Setting 2");
|
|---|
| 512 | _tagNameMap.put(CameraSettings.TAG_UNKNOWN_3, "Unknown Camera Setting 3");
|
|---|
| 513 | _tagNameMap.put(CameraSettings.TAG_UNKNOWN_4, "Unknown Camera Setting 4");
|
|---|
| 514 | _tagNameMap.put(CameraSettings.TAG_DIGITAL_ZOOM, "Digital Zoom");
|
|---|
| 515 | _tagNameMap.put(CameraSettings.TAG_FOCUS_TYPE, "Focus Type");
|
|---|
| 516 | _tagNameMap.put(CameraSettings.TAG_UNKNOWN_7, "Unknown Camera Setting 7");
|
|---|
| 517 | _tagNameMap.put(CameraSettings.TAG_UNKNOWN_8, "Unknown Camera Setting 8");
|
|---|
| 518 | _tagNameMap.put(CameraSettings.TAG_UNKNOWN_9, "Unknown Camera Setting 9");
|
|---|
| 519 | _tagNameMap.put(CameraSettings.TAG_UNKNOWN_10, "Unknown Camera Setting 10");
|
|---|
| 520 | _tagNameMap.put(CameraSettings.TAG_FLASH_ACTIVITY, "Flash Activity");
|
|---|
| 521 | _tagNameMap.put(CameraSettings.TAG_UNKNOWN_12, "Unknown Camera Setting 12");
|
|---|
| 522 | _tagNameMap.put(CameraSettings.TAG_UNKNOWN_13, "Unknown Camera Setting 13");
|
|---|
| 523 |
|
|---|
| 524 | _tagNameMap.put(FocalLength.TAG_WHITE_BALANCE, "White Balance");
|
|---|
| 525 | _tagNameMap.put(FocalLength.TAG_SEQUENCE_NUMBER, "Sequence Number");
|
|---|
| 526 | _tagNameMap.put(FocalLength.TAG_AF_POINT_USED, "AF Point Used");
|
|---|
| 527 | _tagNameMap.put(FocalLength.TAG_FLASH_BIAS, "Flash Bias");
|
|---|
| 528 | _tagNameMap.put(FocalLength.TAG_AUTO_EXPOSURE_BRACKETING, "Auto Exposure Bracketing");
|
|---|
| 529 | _tagNameMap.put(FocalLength.TAG_AEB_BRACKET_VALUE, "AEB Bracket Value");
|
|---|
| 530 | _tagNameMap.put(FocalLength.TAG_SUBJECT_DISTANCE, "Subject Distance");
|
|---|
| 531 |
|
|---|
| 532 | _tagNameMap.put(ShotInfo.TAG_AUTO_ISO, "Auto ISO");
|
|---|
| 533 | _tagNameMap.put(ShotInfo.TAG_BASE_ISO, "Base ISO");
|
|---|
| 534 | _tagNameMap.put(ShotInfo.TAG_MEASURED_EV, "Measured EV");
|
|---|
| 535 | _tagNameMap.put(ShotInfo.TAG_TARGET_APERTURE, "Target Aperture");
|
|---|
| 536 | _tagNameMap.put(ShotInfo.TAG_TARGET_EXPOSURE_TIME, "Target Exposure Time");
|
|---|
| 537 | _tagNameMap.put(ShotInfo.TAG_EXPOSURE_COMPENSATION, "Exposure Compensation");
|
|---|
| 538 | _tagNameMap.put(ShotInfo.TAG_WHITE_BALANCE, "White Balance");
|
|---|
| 539 | _tagNameMap.put(ShotInfo.TAG_SLOW_SHUTTER, "Slow Shutter");
|
|---|
| 540 | _tagNameMap.put(ShotInfo.TAG_SEQUENCE_NUMBER, "Sequence Number");
|
|---|
| 541 | _tagNameMap.put(ShotInfo.TAG_OPTICAL_ZOOM_CODE, "Optical Zoom Code");
|
|---|
| 542 | _tagNameMap.put(ShotInfo.TAG_CAMERA_TEMPERATURE, "Camera Temperature");
|
|---|
| 543 | _tagNameMap.put(ShotInfo.TAG_FLASH_GUIDE_NUMBER, "Flash Guide Number");
|
|---|
| 544 | _tagNameMap.put(ShotInfo.TAG_AF_POINTS_IN_FOCUS, "AF Points in Focus");
|
|---|
| 545 | _tagNameMap.put(ShotInfo.TAG_FLASH_EXPOSURE_BRACKETING, "Flash Exposure Compensation");
|
|---|
| 546 | _tagNameMap.put(ShotInfo.TAG_AUTO_EXPOSURE_BRACKETING, "Auto Exposure Bracketing");
|
|---|
| 547 | _tagNameMap.put(ShotInfo.TAG_AEB_BRACKET_VALUE, "AEB Bracket Value");
|
|---|
| 548 | _tagNameMap.put(ShotInfo.TAG_CONTROL_MODE, "Control Mode");
|
|---|
| 549 | _tagNameMap.put(ShotInfo.TAG_FOCUS_DISTANCE_UPPER, "Focus Distance Upper");
|
|---|
| 550 | _tagNameMap.put(ShotInfo.TAG_FOCUS_DISTANCE_LOWER, "Focus Distance Lower");
|
|---|
| 551 | _tagNameMap.put(ShotInfo.TAG_F_NUMBER, "F Number");
|
|---|
| 552 | _tagNameMap.put(ShotInfo.TAG_EXPOSURE_TIME, "Exposure Time");
|
|---|
| 553 | _tagNameMap.put(ShotInfo.TAG_MEASURED_EV_2, "Measured EV 2");
|
|---|
| 554 | _tagNameMap.put(ShotInfo.TAG_BULB_DURATION, "Bulb Duration");
|
|---|
| 555 | _tagNameMap.put(ShotInfo.TAG_CAMERA_TYPE, "Camera Type");
|
|---|
| 556 | _tagNameMap.put(ShotInfo.TAG_AUTO_ROTATE, "Auto Rotate");
|
|---|
| 557 | _tagNameMap.put(ShotInfo.TAG_ND_FILTER, "ND Filter");
|
|---|
| 558 | _tagNameMap.put(ShotInfo.TAG_SELF_TIMER_2, "Self Timer 2");
|
|---|
| 559 | _tagNameMap.put(ShotInfo.TAG_FLASH_OUTPUT, "Flash Output");
|
|---|
| 560 |
|
|---|
| 561 | _tagNameMap.put(Panorama.TAG_PANORAMA_FRAME_NUMBER, "Panorama Frame Number");
|
|---|
| 562 | _tagNameMap.put(Panorama.TAG_PANORAMA_DIRECTION, "Panorama Direction");
|
|---|
| 563 |
|
|---|
| 564 | _tagNameMap.put(AFInfo.TAG_NUM_AF_POINTS, "AF Point Count");
|
|---|
| 565 | _tagNameMap.put(AFInfo.TAG_VALID_AF_POINTS, "Valid AF Point Count");
|
|---|
| 566 | _tagNameMap.put(AFInfo.TAG_IMAGE_WIDTH, "Image Width");
|
|---|
| 567 | _tagNameMap.put(AFInfo.TAG_IMAGE_HEIGHT, "Image Height");
|
|---|
| 568 | _tagNameMap.put(AFInfo.TAG_AF_IMAGE_WIDTH, "AF Image Width");
|
|---|
| 569 | _tagNameMap.put(AFInfo.TAG_AF_IMAGE_HEIGHT, "AF Image Height");
|
|---|
| 570 | _tagNameMap.put(AFInfo.TAG_AF_AREA_WIDTH, "AF Area Width");
|
|---|
| 571 | _tagNameMap.put(AFInfo.TAG_AF_AREA_HEIGHT, "AF Area Height");
|
|---|
| 572 | _tagNameMap.put(AFInfo.TAG_AF_AREA_X_POSITIONS, "AF Area X Positions");
|
|---|
| 573 | _tagNameMap.put(AFInfo.TAG_AF_AREA_Y_POSITIONS, "AF Area Y Positions");
|
|---|
| 574 | _tagNameMap.put(AFInfo.TAG_AF_POINTS_IN_FOCUS, "AF Points in Focus Count");
|
|---|
| 575 | _tagNameMap.put(AFInfo.TAG_PRIMARY_AF_POINT_1, "Primary AF Point 1");
|
|---|
| 576 | _tagNameMap.put(AFInfo.TAG_PRIMARY_AF_POINT_2, "Primary AF Point 2");
|
|---|
| 577 |
|
|---|
| 578 | // _tagNameMap.put(TAG_CANON_CUSTOM_FUNCTION_LONG_EXPOSURE_NOISE_REDUCTION, "Long Exposure Noise Reduction");
|
|---|
| 579 | // _tagNameMap.put(TAG_CANON_CUSTOM_FUNCTION_SHUTTER_AUTO_EXPOSURE_LOCK_BUTTONS, "Shutter/Auto Exposure-lock Buttons");
|
|---|
| 580 | // _tagNameMap.put(TAG_CANON_CUSTOM_FUNCTION_MIRROR_LOCKUP, "Mirror Lockup");
|
|---|
| 581 | // _tagNameMap.put(TAG_CANON_CUSTOM_FUNCTION_TV_AV_AND_EXPOSURE_LEVEL, "Tv/Av And Exposure Level");
|
|---|
| 582 | // _tagNameMap.put(TAG_CANON_CUSTOM_FUNCTION_AF_ASSIST_LIGHT, "AF-Assist Light");
|
|---|
| 583 | // _tagNameMap.put(TAG_CANON_CUSTOM_FUNCTION_SHUTTER_SPEED_IN_AV_MODE, "Shutter Speed in Av Mode");
|
|---|
| 584 | // _tagNameMap.put(TAG_CANON_CUSTOM_FUNCTION_BRACKETTING, "Auto-Exposure Bracketting Sequence/Auto Cancellation");
|
|---|
| 585 | // _tagNameMap.put(TAG_CANON_CUSTOM_FUNCTION_SHUTTER_CURTAIN_SYNC, "Shutter Curtain Sync");
|
|---|
| 586 | // _tagNameMap.put(TAG_CANON_CUSTOM_FUNCTION_AF_STOP, "Lens Auto-Focus Stop Button Function Switch");
|
|---|
| 587 | // _tagNameMap.put(TAG_CANON_CUSTOM_FUNCTION_FILL_FLASH_REDUCTION, "Auto Reduction of Fill Flash");
|
|---|
| 588 | // _tagNameMap.put(TAG_CANON_CUSTOM_FUNCTION_MENU_BUTTON_RETURN, "Menu Button Return Position");
|
|---|
| 589 | // _tagNameMap.put(TAG_CANON_CUSTOM_FUNCTION_SET_BUTTON_FUNCTION, "SET Button Function When Shooting");
|
|---|
| 590 | // _tagNameMap.put(TAG_CANON_CUSTOM_FUNCTION_SENSOR_CLEANING, "Sensor Cleaning");
|
|---|
| 591 |
|
|---|
| 592 | _tagNameMap.put(TAG_THUMBNAIL_IMAGE_VALID_AREA, "Thumbnail Image Valid Area");
|
|---|
| 593 | _tagNameMap.put(TAG_SERIAL_NUMBER_FORMAT, "Serial Number Format");
|
|---|
| 594 | _tagNameMap.put(TAG_SUPER_MACRO, "Super Macro");
|
|---|
| 595 | _tagNameMap.put(TAG_DATE_STAMP_MODE, "Date Stamp Mode");
|
|---|
| 596 | _tagNameMap.put(TAG_MY_COLORS, "My Colors");
|
|---|
| 597 | _tagNameMap.put(TAG_FIRMWARE_REVISION, "Firmware Revision");
|
|---|
| 598 | _tagNameMap.put(TAG_CATEGORIES, "Categories");
|
|---|
| 599 | _tagNameMap.put(TAG_FACE_DETECT_ARRAY_1, "Face Detect Array 1");
|
|---|
| 600 | _tagNameMap.put(TAG_FACE_DETECT_ARRAY_2, "Face Detect Array 2");
|
|---|
| 601 | _tagNameMap.put(TAG_AF_INFO_ARRAY_2, "AF Info Array 2");
|
|---|
| 602 | _tagNameMap.put(TAG_IMAGE_UNIQUE_ID, "Image Unique ID");
|
|---|
| 603 | _tagNameMap.put(TAG_RAW_DATA_OFFSET, "Raw Data Offset");
|
|---|
| 604 | _tagNameMap.put(TAG_ORIGINAL_DECISION_DATA_OFFSET, "Original Decision Data Offset");
|
|---|
| 605 | _tagNameMap.put(TAG_CUSTOM_FUNCTIONS_1D_ARRAY, "Custom Functions (1D) Array");
|
|---|
| 606 | _tagNameMap.put(TAG_PERSONAL_FUNCTIONS_ARRAY, "Personal Functions Array");
|
|---|
| 607 | _tagNameMap.put(TAG_PERSONAL_FUNCTION_VALUES_ARRAY, "Personal Function Values Array");
|
|---|
| 608 | _tagNameMap.put(TAG_FILE_INFO_ARRAY, "File Info Array");
|
|---|
| 609 | _tagNameMap.put(TAG_AF_POINTS_IN_FOCUS_1D, "AF Points in Focus (1D)");
|
|---|
| 610 | _tagNameMap.put(TAG_LENS_MODEL, "Lens Model");
|
|---|
| 611 | _tagNameMap.put(TAG_SERIAL_INFO_ARRAY, "Serial Info Array");
|
|---|
| 612 | _tagNameMap.put(TAG_DUST_REMOVAL_DATA, "Dust Removal Data");
|
|---|
| 613 | _tagNameMap.put(TAG_CROP_INFO, "Crop Info");
|
|---|
| 614 | _tagNameMap.put(TAG_CUSTOM_FUNCTIONS_ARRAY_2, "Custom Functions Array 2");
|
|---|
| 615 | _tagNameMap.put(TAG_ASPECT_INFO_ARRAY, "Aspect Information Array");
|
|---|
| 616 | _tagNameMap.put(TAG_PROCESSING_INFO_ARRAY, "Processing Information Array");
|
|---|
| 617 | _tagNameMap.put(TAG_TONE_CURVE_TABLE, "Tone Curve Table");
|
|---|
| 618 | _tagNameMap.put(TAG_SHARPNESS_TABLE, "Sharpness Table");
|
|---|
| 619 | _tagNameMap.put(TAG_SHARPNESS_FREQ_TABLE, "Sharpness Frequency Table");
|
|---|
| 620 | _tagNameMap.put(TAG_WHITE_BALANCE_TABLE, "White Balance Table");
|
|---|
| 621 | _tagNameMap.put(TAG_COLOR_BALANCE_ARRAY, "Color Balance Array");
|
|---|
| 622 | _tagNameMap.put(TAG_MEASURED_COLOR_ARRAY, "Measured Color Array");
|
|---|
| 623 | _tagNameMap.put(TAG_COLOR_TEMPERATURE, "Color Temperature");
|
|---|
| 624 | _tagNameMap.put(TAG_CANON_FLAGS_ARRAY, "Canon Flags Array");
|
|---|
| 625 | _tagNameMap.put(TAG_MODIFIED_INFO_ARRAY, "Modified Information Array");
|
|---|
| 626 | _tagNameMap.put(TAG_TONE_CURVE_MATCHING, "Tone Curve Matching");
|
|---|
| 627 | _tagNameMap.put(TAG_WHITE_BALANCE_MATCHING, "White Balance Matching");
|
|---|
| 628 | _tagNameMap.put(TAG_COLOR_SPACE, "Color Space");
|
|---|
| 629 | _tagNameMap.put(TAG_PREVIEW_IMAGE_INFO_ARRAY, "Preview Image Info Array");
|
|---|
| 630 | _tagNameMap.put(TAG_VRD_OFFSET, "VRD Offset");
|
|---|
| 631 | _tagNameMap.put(TAG_SENSOR_INFO_ARRAY, "Sensor Information Array");
|
|---|
| 632 | _tagNameMap.put(TAG_COLOR_DATA_ARRAY_2, "Color Data Array 1");
|
|---|
| 633 | _tagNameMap.put(TAG_COLOR_INFO_ARRAY_2, "Color Data Array 2");
|
|---|
| 634 | _tagNameMap.put(TAG_CUSTOM_PICTURE_STYLE_FILE_NAME, "Custom Picture Style File Name");
|
|---|
| 635 | _tagNameMap.put(TAG_COLOR_INFO_ARRAY, "Color Info Array");
|
|---|
| 636 | _tagNameMap.put(TAG_VIGNETTING_CORRECTION_ARRAY_1, "Vignetting Correction Array 1");
|
|---|
| 637 | _tagNameMap.put(TAG_VIGNETTING_CORRECTION_ARRAY_2, "Vignetting Correction Array 2");
|
|---|
| 638 | _tagNameMap.put(TAG_LIGHTING_OPTIMIZER_ARRAY, "Lighting Optimizer Array");
|
|---|
| 639 | _tagNameMap.put(TAG_LENS_INFO_ARRAY, "Lens Info Array");
|
|---|
| 640 | _tagNameMap.put(TAG_AMBIANCE_INFO_ARRAY, "Ambiance Info Array");
|
|---|
| 641 | _tagNameMap.put(TAG_FILTER_INFO_ARRAY, "Filter Info Array");
|
|---|
| 642 | }
|
|---|
| 643 |
|
|---|
| 644 | public CanonMakernoteDirectory()
|
|---|
| 645 | {
|
|---|
| 646 | this.setDescriptor(new CanonMakernoteDescriptor(this));
|
|---|
| 647 | }
|
|---|
| 648 |
|
|---|
| 649 | @NotNull
|
|---|
| 650 | public String getName()
|
|---|
| 651 | {
|
|---|
| 652 | return "Canon Makernote";
|
|---|
| 653 | }
|
|---|
| 654 |
|
|---|
| 655 | @NotNull
|
|---|
| 656 | protected HashMap<Integer, String> getTagNameMap()
|
|---|
| 657 | {
|
|---|
| 658 | return _tagNameMap;
|
|---|
| 659 | }
|
|---|
| 660 |
|
|---|
| 661 | @Override
|
|---|
| 662 | public void setIntArray(int tagType, @NotNull int[] ints)
|
|---|
| 663 | {
|
|---|
| 664 | // TODO is there some way to drop out 'null' or 'zero' values that are present in the array to reduce the noise?
|
|---|
| 665 |
|
|---|
| 666 | // Certain Canon tags contain arrays of values that we split into 'fake' tags as each
|
|---|
| 667 | // index in the array has its own meaning and decoding.
|
|---|
| 668 | // Pick those tags out here and throw away the original array.
|
|---|
| 669 | // Otherwise just add as usual.
|
|---|
| 670 | switch (tagType) {
|
|---|
| 671 | case TAG_CAMERA_SETTINGS_ARRAY:
|
|---|
| 672 | for (int i = 0; i < ints.length; i++)
|
|---|
| 673 | setInt(CameraSettings.OFFSET + i, ints[i]);
|
|---|
| 674 | break;
|
|---|
| 675 | case TAG_FOCAL_LENGTH_ARRAY:
|
|---|
| 676 | for (int i = 0; i < ints.length; i++)
|
|---|
| 677 | setInt(FocalLength.OFFSET + i, ints[i]);
|
|---|
| 678 | break;
|
|---|
| 679 | case TAG_SHOT_INFO_ARRAY:
|
|---|
| 680 | for (int i = 0; i < ints.length; i++)
|
|---|
| 681 | setInt(ShotInfo.OFFSET + i, ints[i]);
|
|---|
| 682 | break;
|
|---|
| 683 | case TAG_PANORAMA_ARRAY:
|
|---|
| 684 | for (int i = 0; i < ints.length; i++)
|
|---|
| 685 | setInt(Panorama.OFFSET + i, ints[i]);
|
|---|
| 686 | break;
|
|---|
| 687 | // TODO the interpretation of the custom functions tag depends upon the camera model
|
|---|
| 688 | // case TAG_CANON_CUSTOM_FUNCTIONS_ARRAY:
|
|---|
| 689 | // int subTagTypeBase = 0xC300;
|
|---|
| 690 | // // we intentionally skip the first array member
|
|---|
| 691 | // for (int i = 1; i < ints.length; i++)
|
|---|
| 692 | // setInt(subTagTypeBase + i + 1, ints[i] & 0x0F);
|
|---|
| 693 | // break;
|
|---|
| 694 | case TAG_AF_INFO_ARRAY:
|
|---|
| 695 | for (int i = 0; i < ints.length; i++)
|
|---|
| 696 | setInt(AFInfo.OFFSET + i, ints[i]);
|
|---|
| 697 | break;
|
|---|
| 698 | default:
|
|---|
| 699 | // no special handling...
|
|---|
| 700 | super.setIntArray(tagType, ints);
|
|---|
| 701 | break;
|
|---|
| 702 | }
|
|---|
| 703 | }
|
|---|
| 704 | }
|
|---|