| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
package com.drew.metadata.exif.makernotes; |
| 22 |
|
| 23 |
import com.drew.lang.annotations.NotNull; |
| 24 |
import com.drew.metadata.Directory; |
| 25 |
|
| 26 |
import java.util.HashMap; |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
@SuppressWarnings("WeakerAccess") |
| 38 |
public class CanonMakernoteDirectory extends Directory |
| 39 |
{ |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
private static final int TAG_CAMERA_SETTINGS_ARRAY = 0x0001; |
| 45 |
private static final int TAG_FOCAL_LENGTH_ARRAY = 0x0002; |
| 46 |
|
| 47 |
private static final int TAG_SHOT_INFO_ARRAY = 0x0004; |
| 48 |
private static final int TAG_PANORAMA_ARRAY = 0x0005; |
| 49 |
|
| 50 |
public static final int TAG_CANON_IMAGE_TYPE = 0x0006; |
| 51 |
public static final int TAG_CANON_FIRMWARE_VERSION = 0x0007; |
| 52 |
public static final int TAG_CANON_IMAGE_NUMBER = 0x0008; |
| 53 |
public static final int TAG_CANON_OWNER_NAME = 0x0009; |
| 54 |
public static final int TAG_CANON_SERIAL_NUMBER = 0x000C; |
| 55 |
public static final int TAG_CAMERA_INFO_ARRAY = 0x000D; |
| 56 |
public static final int TAG_CANON_FILE_LENGTH = 0x000E; |
| 57 |
public static final int TAG_CANON_CUSTOM_FUNCTIONS_ARRAY = 0x000F; |
| 58 |
public static final int TAG_MODEL_ID = 0x0010; |
| 59 |
public static final int TAG_MOVIE_INFO_ARRAY = 0x0011; |
| 60 |
private static final int TAG_AF_INFO_ARRAY = 0x0012; |
| 61 |
public static final int TAG_THUMBNAIL_IMAGE_VALID_AREA = 0x0013; |
| 62 |
public static final int TAG_SERIAL_NUMBER_FORMAT = 0x0015; |
| 63 |
public static final int TAG_SUPER_MACRO = 0x001A; |
| 64 |
public static final int TAG_DATE_STAMP_MODE = 0x001C; |
| 65 |
public static final int TAG_MY_COLORS = 0x001D; |
| 66 |
public static final int TAG_FIRMWARE_REVISION = 0x001E; |
| 67 |
public static final int TAG_CATEGORIES = 0x0023; |
| 68 |
public static final int TAG_FACE_DETECT_ARRAY_1 = 0x0024; |
| 69 |
public static final int TAG_FACE_DETECT_ARRAY_2 = 0x0025; |
| 70 |
public static final int TAG_AF_INFO_ARRAY_2 = 0x0026; |
| 71 |
public static final int TAG_IMAGE_UNIQUE_ID = 0x0028; |
| 72 |
|
| 73 |
public static final int TAG_RAW_DATA_OFFSET = 0x0081; |
| 74 |
public static final int TAG_ORIGINAL_DECISION_DATA_OFFSET = 0x0083; |
| 75 |
|
| 76 |
public static final int TAG_CUSTOM_FUNCTIONS_1D_ARRAY = 0x0090; |
| 77 |
public static final int TAG_PERSONAL_FUNCTIONS_ARRAY = 0x0091; |
| 78 |
public static final int TAG_PERSONAL_FUNCTION_VALUES_ARRAY = 0x0092; |
| 79 |
public static final int TAG_FILE_INFO_ARRAY = 0x0093; |
| 80 |
public static final int TAG_AF_POINTS_IN_FOCUS_1D = 0x0094; |
| 81 |
public static final int TAG_LENS_MODEL = 0x0095; |
| 82 |
public static final int TAG_SERIAL_INFO_ARRAY = 0x0096; |
| 83 |
public static final int TAG_DUST_REMOVAL_DATA = 0x0097; |
| 84 |
public static final int TAG_CROP_INFO = 0x0098; |
| 85 |
public static final int TAG_CUSTOM_FUNCTIONS_ARRAY_2 = 0x0099; |
| 86 |
public static final int TAG_ASPECT_INFO_ARRAY = 0x009A; |
| 87 |
public static final int TAG_PROCESSING_INFO_ARRAY = 0x00A0; |
| 88 |
public static final int TAG_TONE_CURVE_TABLE = 0x00A1; |
| 89 |
public static final int TAG_SHARPNESS_TABLE = 0x00A2; |
| 90 |
public static final int TAG_SHARPNESS_FREQ_TABLE = 0x00A3; |
| 91 |
public static final int TAG_WHITE_BALANCE_TABLE = 0x00A4; |
| 92 |
public static final int TAG_COLOR_BALANCE_ARRAY = 0x00A9; |
| 93 |
public static final int TAG_MEASURED_COLOR_ARRAY = 0x00AA; |
| 94 |
public static final int TAG_COLOR_TEMPERATURE = 0x00AE; |
| 95 |
public static final int TAG_CANON_FLAGS_ARRAY = 0x00B0; |
| 96 |
public static final int TAG_MODIFIED_INFO_ARRAY = 0x00B1; |
| 97 |
public static final int TAG_TONE_CURVE_MATCHING = 0x00B2; |
| 98 |
public static final int TAG_WHITE_BALANCE_MATCHING = 0x00B3; |
| 99 |
public static final int TAG_COLOR_SPACE = 0x00B4; |
| 100 |
public static final int TAG_PREVIEW_IMAGE_INFO_ARRAY = 0x00B6; |
| 101 |
public static final int TAG_VRD_OFFSET = 0x00D0; |
| 102 |
public static final int TAG_SENSOR_INFO_ARRAY = 0x00E0; |
| 103 |
|
| 104 |
public static final int TAG_COLOR_DATA_ARRAY_2 = 0x4001; |
| 105 |
public static final int TAG_CRW_PARAM = 0x4002; |
| 106 |
public static final int TAG_COLOR_INFO_ARRAY_2 = 0x4003; |
| 107 |
public static final int TAG_BLACK_LEVEL = 0x4008; |
| 108 |
public static final int TAG_CUSTOM_PICTURE_STYLE_FILE_NAME = 0x4010; |
| 109 |
public static final int TAG_COLOR_INFO_ARRAY = 0x4013; |
| 110 |
public static final int TAG_VIGNETTING_CORRECTION_ARRAY_1 = 0x4015; |
| 111 |
public static final int TAG_VIGNETTING_CORRECTION_ARRAY_2 = 0x4016; |
| 112 |
public static final int TAG_LIGHTING_OPTIMIZER_ARRAY = 0x4018; |
| 113 |
public static final int TAG_LENS_INFO_ARRAY = 0x4019; |
| 114 |
public static final int TAG_AMBIANCE_INFO_ARRAY = 0x4020; |
| 115 |
public static final int TAG_FILTER_INFO_ARRAY = 0x4024; |
| 116 |
|
| 117 |
public final static class CameraSettings |
| 118 |
{ |
| 119 |
|
| 120 |
private static final int OFFSET = 0xC100; |
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
public static final int TAG_MACRO_MODE = OFFSET + 0x01; |
| 127 |
public static final int TAG_SELF_TIMER_DELAY = OFFSET + 0x02; |
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
public static final int TAG_QUALITY = OFFSET + 0x03; |
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
public static final int TAG_FLASH_MODE = OFFSET + 0x04; |
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
public static final int TAG_CONTINUOUS_DRIVE_MODE = OFFSET + 0x05; |
| 150 |
public static final int TAG_UNKNOWN_2 = OFFSET + 0x06; |
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
public static final int TAG_FOCUS_MODE_1 = OFFSET + 0x07; |
| 161 |
public static final int TAG_UNKNOWN_3 = OFFSET + 0x08; |
| 162 |
public static final int TAG_RECORD_MODE = OFFSET + 0x09; |
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
public static final int TAG_IMAGE_SIZE = OFFSET + 0x0A; |
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
public static final int TAG_EASY_SHOOTING_MODE = OFFSET + 0x0B; |
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
public static final int TAG_DIGITAL_ZOOM = OFFSET + 0x0C; |
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
public static final int TAG_CONTRAST = OFFSET + 0x0D; |
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
public static final int TAG_SATURATION = OFFSET + 0x0E; |
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
public static final int TAG_SHARPNESS = OFFSET + 0x0F; |
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
public static final int TAG_ISO = OFFSET + 0x10; |
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
public static final int TAG_METERING_MODE = OFFSET + 0x11; |
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
public static final int TAG_FOCUS_TYPE = OFFSET + 0x12; |
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
public static final int TAG_AF_POINT_SELECTED = OFFSET + 0x13; |
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
public static final int TAG_EXPOSURE_MODE = OFFSET + 0x14; |
| 247 |
public static final int TAG_UNKNOWN_7 = OFFSET + 0x15; |
| 248 |
public static final int TAG_LENS_TYPE = OFFSET + 0x16; |
| 249 |
public static final int TAG_LONG_FOCAL_LENGTH = OFFSET + 0x17; |
| 250 |
public static final int TAG_SHORT_FOCAL_LENGTH = OFFSET + 0x18; |
| 251 |
public static final int TAG_FOCAL_UNITS_PER_MM = OFFSET + 0x19; |
| 252 |
public static final int TAG_MAX_APERTURE = OFFSET + 0x1A; |
| 253 |
public static final int TAG_MIN_APERTURE = OFFSET + 0x1B; |
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
public static final int TAG_FLASH_ACTIVITY = OFFSET + 0x1C; |
| 259 |
public static final int TAG_FLASH_DETAILS = OFFSET + 0x1D; |
| 260 |
public static final int TAG_FOCUS_CONTINUOUS = OFFSET + 0x1E; |
| 261 |
public static final int TAG_AE_SETTING = OFFSET + 0x1F; |
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
public static final int TAG_FOCUS_MODE_2 = OFFSET + 0x20; |
| 267 |
|
| 268 |
public static final int TAG_DISPLAY_APERTURE = OFFSET + 0x21; |
| 269 |
public static final int TAG_ZOOM_SOURCE_WIDTH = OFFSET + 0x22; |
| 270 |
public static final int TAG_ZOOM_TARGET_WIDTH = OFFSET + 0x23; |
| 271 |
|
| 272 |
public static final int TAG_SPOT_METERING_MODE = OFFSET + 0x25; |
| 273 |
public static final int TAG_PHOTO_EFFECT = OFFSET + 0x26; |
| 274 |
public static final int TAG_MANUAL_FLASH_OUTPUT = OFFSET + 0x27; |
| 275 |
|
| 276 |
public static final int TAG_COLOR_TONE = OFFSET + 0x29; |
| 277 |
public static final int TAG_SRAW_QUALITY = OFFSET + 0x2D; |
| 278 |
} |
| 279 |
|
| 280 |
public final static class FocalLength |
| 281 |
{ |
| 282 |
|
| 283 |
|
| 284 |
private static final int OFFSET = 0xC200; |
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
public static final int TAG_WHITE_BALANCE = OFFSET + 0x07; |
| 296 |
public static final int TAG_SEQUENCE_NUMBER = OFFSET + 0x09; |
| 297 |
public static final int TAG_AF_POINT_USED = OFFSET + 0x0E; |
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
|
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
public static final int TAG_FLASH_BIAS = OFFSET + 0x0F; |
| 320 |
public static final int TAG_AUTO_EXPOSURE_BRACKETING = OFFSET + 0x10; |
| 321 |
public static final int TAG_AEB_BRACKET_VALUE = OFFSET + 0x11; |
| 322 |
public static final int TAG_SUBJECT_DISTANCE = OFFSET + 0x13; |
| 323 |
} |
| 324 |
|
| 325 |
public final static class ShotInfo |
| 326 |
{ |
| 327 |
|
| 328 |
|
| 329 |
private static final int OFFSET = 0xC400; |
| 330 |
|
| 331 |
public static final int TAG_AUTO_ISO = OFFSET + 1; |
| 332 |
public static final int TAG_BASE_ISO = OFFSET + 2; |
| 333 |
public static final int TAG_MEASURED_EV = OFFSET + 3; |
| 334 |
public static final int TAG_TARGET_APERTURE = OFFSET + 4; |
| 335 |
public static final int TAG_TARGET_EXPOSURE_TIME = OFFSET + 5; |
| 336 |
public static final int TAG_EXPOSURE_COMPENSATION = OFFSET + 6; |
| 337 |
public static final int TAG_WHITE_BALANCE = OFFSET + 7; |
| 338 |
public static final int TAG_SLOW_SHUTTER = OFFSET + 8; |
| 339 |
public static final int TAG_SEQUENCE_NUMBER = OFFSET + 9; |
| 340 |
public static final int TAG_OPTICAL_ZOOM_CODE = OFFSET + 10; |
| 341 |
public static final int TAG_CAMERA_TEMPERATURE = OFFSET + 12; |
| 342 |
public static final int TAG_FLASH_GUIDE_NUMBER = OFFSET + 13; |
| 343 |
public static final int TAG_AF_POINTS_IN_FOCUS = OFFSET + 14; |
| 344 |
public static final int TAG_FLASH_EXPOSURE_BRACKETING = OFFSET + 15; |
| 345 |
public static final int TAG_AUTO_EXPOSURE_BRACKETING = OFFSET + 16; |
| 346 |
public static final int TAG_AEB_BRACKET_VALUE = OFFSET + 17; |
| 347 |
public static final int TAG_CONTROL_MODE = OFFSET + 18; |
| 348 |
public static final int TAG_FOCUS_DISTANCE_UPPER = OFFSET + 19; |
| 349 |
public static final int TAG_FOCUS_DISTANCE_LOWER = OFFSET + 20; |
| 350 |
public static final int TAG_F_NUMBER = OFFSET + 21; |
| 351 |
public static final int TAG_EXPOSURE_TIME = OFFSET + 22; |
| 352 |
public static final int TAG_MEASURED_EV_2 = OFFSET + 23; |
| 353 |
public static final int TAG_BULB_DURATION = OFFSET + 24; |
| 354 |
public static final int TAG_CAMERA_TYPE = OFFSET + 26; |
| 355 |
public static final int TAG_AUTO_ROTATE = OFFSET + 27; |
| 356 |
public static final int TAG_ND_FILTER = OFFSET + 28; |
| 357 |
public static final int TAG_SELF_TIMER_2 = OFFSET + 29; |
| 358 |
public static final int TAG_FLASH_OUTPUT = OFFSET + 33; |
| 359 |
} |
| 360 |
|
| 361 |
public final static class Panorama |
| 362 |
{ |
| 363 |
|
| 364 |
|
| 365 |
private static final int OFFSET = 0xC500; |
| 366 |
|
| 367 |
public static final int TAG_PANORAMA_FRAME_NUMBER = OFFSET + 2; |
| 368 |
public static final int TAG_PANORAMA_DIRECTION = OFFSET + 5; |
| 369 |
} |
| 370 |
|
| 371 |
public final static class AFInfo |
| 372 |
{ |
| 373 |
|
| 374 |
|
| 375 |
private static final int OFFSET = 0xD200; |
| 376 |
|
| 377 |
public static final int TAG_NUM_AF_POINTS = OFFSET; |
| 378 |
public static final int TAG_VALID_AF_POINTS = OFFSET + 1; |
| 379 |
public static final int TAG_IMAGE_WIDTH = OFFSET + 2; |
| 380 |
public static final int TAG_IMAGE_HEIGHT = OFFSET + 3; |
| 381 |
public static final int TAG_AF_IMAGE_WIDTH = OFFSET + 4; |
| 382 |
public static final int TAG_AF_IMAGE_HEIGHT = OFFSET + 5; |
| 383 |
public static final int TAG_AF_AREA_WIDTH = OFFSET + 6; |
| 384 |
public static final int TAG_AF_AREA_HEIGHT = OFFSET + 7; |
| 385 |
public static final int TAG_AF_AREA_X_POSITIONS = OFFSET + 8; |
| 386 |
public static final int TAG_AF_AREA_Y_POSITIONS = OFFSET + 9; |
| 387 |
public static final int TAG_AF_POINTS_IN_FOCUS = OFFSET + 10; |
| 388 |
public static final int TAG_PRIMARY_AF_POINT_1 = OFFSET + 11; |
| 389 |
public static final int TAG_PRIMARY_AF_POINT_2 = OFFSET + 12; |
| 390 |
} |
| 391 |
|
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
|
| 396 |
|
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
|
| 401 |
|
| 402 |
|
| 403 |
|
| 404 |
|
| 405 |
|
| 406 |
|
| 407 |
|
| 408 |
|
| 409 |
|
| 410 |
|
| 411 |
|
| 412 |
|
| 413 |
|
| 414 |
|
| 415 |
|
| 416 |
|
| 417 |
|
| 418 |
|
| 419 |
|
| 420 |
|
| 421 |
|
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
|
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
|
| 431 |
|
| 432 |
|
| 433 |
|
| 434 |
|
| 435 |
|
| 436 |
|
| 437 |
|
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
|
| 442 |
|
| 443 |
|
| 444 |
|
| 445 |
|
| 446 |
|
| 447 |
|
| 448 |
|
| 449 |
|
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
|
| 455 |
|
| 456 |
|
| 457 |
|
| 458 |
|
| 459 |
|
| 460 |
|
| 461 |
|
| 462 |
|
| 463 |
|
| 464 |
|
| 465 |
|
| 466 |
|
| 467 |
|
| 468 |
|
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
|
| 473 |
|
| 474 |
|
| 475 |
|
| 476 |
|
| 477 |
|
| 478 |
|
| 479 |
|
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
|
| 487 |
|
| 488 |
|
| 489 |
|
| 490 |
|
| 491 |
@NotNull |
| 492 |
private static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>(); |
| 493 |
|
| 494 |
static |
| 495 |
{ |
| 496 |
_tagNameMap.put(TAG_CANON_FIRMWARE_VERSION, "Firmware Version"); |
| 497 |
_tagNameMap.put(TAG_CANON_IMAGE_NUMBER, "Image Number"); |
| 498 |
_tagNameMap.put(TAG_CANON_IMAGE_TYPE, "Image Type"); |
| 499 |
_tagNameMap.put(TAG_CANON_OWNER_NAME, "Owner Name"); |
| 500 |
_tagNameMap.put(TAG_CANON_SERIAL_NUMBER, "Camera Serial Number"); |
| 501 |
_tagNameMap.put(TAG_CAMERA_INFO_ARRAY, "Camera Info Array"); |
| 502 |
_tagNameMap.put(TAG_CANON_FILE_LENGTH, "File Length"); |
| 503 |
_tagNameMap.put(TAG_CANON_CUSTOM_FUNCTIONS_ARRAY, "Custom Functions"); |
| 504 |
_tagNameMap.put(TAG_MODEL_ID, "Canon Model ID"); |
| 505 |
_tagNameMap.put(TAG_MOVIE_INFO_ARRAY, "Movie Info Array"); |
| 506 |
|
| 507 |
_tagNameMap.put(CameraSettings.TAG_AF_POINT_SELECTED, "AF Point Selected"); |
| 508 |
_tagNameMap.put(CameraSettings.TAG_CONTINUOUS_DRIVE_MODE, "Continuous Drive Mode"); |
| 509 |
_tagNameMap.put(CameraSettings.TAG_CONTRAST, "Contrast"); |
| 510 |
_tagNameMap.put(CameraSettings.TAG_EASY_SHOOTING_MODE, "Easy Shooting Mode"); |
| 511 |
_tagNameMap.put(CameraSettings.TAG_EXPOSURE_MODE, "Exposure Mode"); |
| 512 |
_tagNameMap.put(CameraSettings.TAG_FLASH_DETAILS, "Flash Details"); |
| 513 |
_tagNameMap.put(CameraSettings.TAG_FLASH_MODE, "Flash Mode"); |
| 514 |
_tagNameMap.put(CameraSettings.TAG_FOCAL_UNITS_PER_MM, "Focal Units per mm"); |
| 515 |
_tagNameMap.put(CameraSettings.TAG_FOCUS_MODE_1, "Focus Mode"); |
| 516 |
_tagNameMap.put(CameraSettings.TAG_FOCUS_MODE_2, "Focus Mode"); |
| 517 |
_tagNameMap.put(CameraSettings.TAG_IMAGE_SIZE, "Image Size"); |
| 518 |
_tagNameMap.put(CameraSettings.TAG_ISO, "Iso"); |
| 519 |
_tagNameMap.put(CameraSettings.TAG_LONG_FOCAL_LENGTH, "Long Focal Length"); |
| 520 |
_tagNameMap.put(CameraSettings.TAG_MACRO_MODE, "Macro Mode"); |
| 521 |
_tagNameMap.put(CameraSettings.TAG_METERING_MODE, "Metering Mode"); |
| 522 |
_tagNameMap.put(CameraSettings.TAG_SATURATION, "Saturation"); |
| 523 |
_tagNameMap.put(CameraSettings.TAG_SELF_TIMER_DELAY, "Self Timer Delay"); |
| 524 |
_tagNameMap.put(CameraSettings.TAG_SHARPNESS, "Sharpness"); |
| 525 |
_tagNameMap.put(CameraSettings.TAG_SHORT_FOCAL_LENGTH, "Short Focal Length"); |
| 526 |
_tagNameMap.put(CameraSettings.TAG_QUALITY, "Quality"); |
| 527 |
_tagNameMap.put(CameraSettings.TAG_UNKNOWN_2, "Unknown Camera Setting 2"); |
| 528 |
_tagNameMap.put(CameraSettings.TAG_UNKNOWN_3, "Unknown Camera Setting 3"); |
| 529 |
_tagNameMap.put(CameraSettings.TAG_RECORD_MODE, "Record Mode"); |
| 530 |
_tagNameMap.put(CameraSettings.TAG_DIGITAL_ZOOM, "Digital Zoom"); |
| 531 |
_tagNameMap.put(CameraSettings.TAG_FOCUS_TYPE, "Focus Type"); |
| 532 |
_tagNameMap.put(CameraSettings.TAG_UNKNOWN_7, "Unknown Camera Setting 7"); |
| 533 |
_tagNameMap.put(CameraSettings.TAG_LENS_TYPE, "Lens Type"); |
| 534 |
_tagNameMap.put(CameraSettings.TAG_MAX_APERTURE, "Max Aperture"); |
| 535 |
_tagNameMap.put(CameraSettings.TAG_MIN_APERTURE, "Min Aperture"); |
| 536 |
_tagNameMap.put(CameraSettings.TAG_FLASH_ACTIVITY, "Flash Activity"); |
| 537 |
_tagNameMap.put(CameraSettings.TAG_FOCUS_CONTINUOUS, "Focus Continuous"); |
| 538 |
_tagNameMap.put(CameraSettings.TAG_AE_SETTING, "AE Setting"); |
| 539 |
_tagNameMap.put(CameraSettings.TAG_DISPLAY_APERTURE, "Display Aperture"); |
| 540 |
_tagNameMap.put(CameraSettings.TAG_ZOOM_SOURCE_WIDTH, "Zoom Source Width"); |
| 541 |
_tagNameMap.put(CameraSettings.TAG_ZOOM_TARGET_WIDTH, "Zoom Target Width"); |
| 542 |
_tagNameMap.put(CameraSettings.TAG_SPOT_METERING_MODE, "Spot Metering Mode"); |
| 543 |
_tagNameMap.put(CameraSettings.TAG_PHOTO_EFFECT, "Photo Effect"); |
| 544 |
_tagNameMap.put(CameraSettings.TAG_MANUAL_FLASH_OUTPUT, "Manual Flash Output"); |
| 545 |
_tagNameMap.put(CameraSettings.TAG_COLOR_TONE, "Color Tone"); |
| 546 |
_tagNameMap.put(CameraSettings.TAG_SRAW_QUALITY, "SRAW Quality"); |
| 547 |
|
| 548 |
_tagNameMap.put(FocalLength.TAG_WHITE_BALANCE, "White Balance"); |
| 549 |
_tagNameMap.put(FocalLength.TAG_SEQUENCE_NUMBER, "Sequence Number"); |
| 550 |
_tagNameMap.put(FocalLength.TAG_AF_POINT_USED, "AF Point Used"); |
| 551 |
_tagNameMap.put(FocalLength.TAG_FLASH_BIAS, "Flash Bias"); |
| 552 |
_tagNameMap.put(FocalLength.TAG_AUTO_EXPOSURE_BRACKETING, "Auto Exposure Bracketing"); |
| 553 |
_tagNameMap.put(FocalLength.TAG_AEB_BRACKET_VALUE, "AEB Bracket Value"); |
| 554 |
_tagNameMap.put(FocalLength.TAG_SUBJECT_DISTANCE, "Subject Distance"); |
| 555 |
|
| 556 |
_tagNameMap.put(ShotInfo.TAG_AUTO_ISO, "Auto ISO"); |
| 557 |
_tagNameMap.put(ShotInfo.TAG_BASE_ISO, "Base ISO"); |
| 558 |
_tagNameMap.put(ShotInfo.TAG_MEASURED_EV, "Measured EV"); |
| 559 |
_tagNameMap.put(ShotInfo.TAG_TARGET_APERTURE, "Target Aperture"); |
| 560 |
_tagNameMap.put(ShotInfo.TAG_TARGET_EXPOSURE_TIME, "Target Exposure Time"); |
| 561 |
_tagNameMap.put(ShotInfo.TAG_EXPOSURE_COMPENSATION, "Exposure Compensation"); |
| 562 |
_tagNameMap.put(ShotInfo.TAG_WHITE_BALANCE, "White Balance"); |
| 563 |
_tagNameMap.put(ShotInfo.TAG_SLOW_SHUTTER, "Slow Shutter"); |
| 564 |
_tagNameMap.put(ShotInfo.TAG_SEQUENCE_NUMBER, "Sequence Number"); |
| 565 |
_tagNameMap.put(ShotInfo.TAG_OPTICAL_ZOOM_CODE, "Optical Zoom Code"); |
| 566 |
_tagNameMap.put(ShotInfo.TAG_CAMERA_TEMPERATURE, "Camera Temperature"); |
| 567 |
_tagNameMap.put(ShotInfo.TAG_FLASH_GUIDE_NUMBER, "Flash Guide Number"); |
| 568 |
_tagNameMap.put(ShotInfo.TAG_AF_POINTS_IN_FOCUS, "AF Points in Focus"); |
| 569 |
_tagNameMap.put(ShotInfo.TAG_FLASH_EXPOSURE_BRACKETING, "Flash Exposure Compensation"); |
| 570 |
_tagNameMap.put(ShotInfo.TAG_AUTO_EXPOSURE_BRACKETING, "Auto Exposure Bracketing"); |
| 571 |
_tagNameMap.put(ShotInfo.TAG_AEB_BRACKET_VALUE, "AEB Bracket Value"); |
| 572 |
_tagNameMap.put(ShotInfo.TAG_CONTROL_MODE, "Control Mode"); |
| 573 |
_tagNameMap.put(ShotInfo.TAG_FOCUS_DISTANCE_UPPER, "Focus Distance Upper"); |
| 574 |
_tagNameMap.put(ShotInfo.TAG_FOCUS_DISTANCE_LOWER, "Focus Distance Lower"); |
| 575 |
_tagNameMap.put(ShotInfo.TAG_F_NUMBER, "F Number"); |
| 576 |
_tagNameMap.put(ShotInfo.TAG_EXPOSURE_TIME, "Exposure Time"); |
| 577 |
_tagNameMap.put(ShotInfo.TAG_MEASURED_EV_2, "Measured EV 2"); |
| 578 |
_tagNameMap.put(ShotInfo.TAG_BULB_DURATION, "Bulb Duration"); |
| 579 |
_tagNameMap.put(ShotInfo.TAG_CAMERA_TYPE, "Camera Type"); |
| 580 |
_tagNameMap.put(ShotInfo.TAG_AUTO_ROTATE, "Auto Rotate"); |
| 581 |
_tagNameMap.put(ShotInfo.TAG_ND_FILTER, "ND Filter"); |
| 582 |
_tagNameMap.put(ShotInfo.TAG_SELF_TIMER_2, "Self Timer 2"); |
| 583 |
_tagNameMap.put(ShotInfo.TAG_FLASH_OUTPUT, "Flash Output"); |
| 584 |
|
| 585 |
_tagNameMap.put(Panorama.TAG_PANORAMA_FRAME_NUMBER, "Panorama Frame Number"); |
| 586 |
_tagNameMap.put(Panorama.TAG_PANORAMA_DIRECTION, "Panorama Direction"); |
| 587 |
|
| 588 |
_tagNameMap.put(AFInfo.TAG_NUM_AF_POINTS, "AF Point Count"); |
| 589 |
_tagNameMap.put(AFInfo.TAG_VALID_AF_POINTS, "Valid AF Point Count"); |
| 590 |
_tagNameMap.put(AFInfo.TAG_IMAGE_WIDTH, "Image Width"); |
| 591 |
_tagNameMap.put(AFInfo.TAG_IMAGE_HEIGHT, "Image Height"); |
| 592 |
_tagNameMap.put(AFInfo.TAG_AF_IMAGE_WIDTH, "AF Image Width"); |
| 593 |
_tagNameMap.put(AFInfo.TAG_AF_IMAGE_HEIGHT, "AF Image Height"); |
| 594 |
_tagNameMap.put(AFInfo.TAG_AF_AREA_WIDTH, "AF Area Width"); |
| 595 |
_tagNameMap.put(AFInfo.TAG_AF_AREA_HEIGHT, "AF Area Height"); |
| 596 |
_tagNameMap.put(AFInfo.TAG_AF_AREA_X_POSITIONS, "AF Area X Positions"); |
| 597 |
_tagNameMap.put(AFInfo.TAG_AF_AREA_Y_POSITIONS, "AF Area Y Positions"); |
| 598 |
_tagNameMap.put(AFInfo.TAG_AF_POINTS_IN_FOCUS, "AF Points in Focus"); |
| 599 |
_tagNameMap.put(AFInfo.TAG_PRIMARY_AF_POINT_1, "Primary AF Point 1"); |
| 600 |
_tagNameMap.put(AFInfo.TAG_PRIMARY_AF_POINT_2, "Primary AF Point 2"); |
| 601 |
|
| 602 |
|
| 603 |
|
| 604 |
|
| 605 |
|
| 606 |
|
| 607 |
|
| 608 |
|
| 609 |
|
| 610 |
|
| 611 |
|
| 612 |
|
| 613 |
|
| 614 |
|
| 615 |
|
| 616 |
_tagNameMap.put(TAG_THUMBNAIL_IMAGE_VALID_AREA, "Thumbnail Image Valid Area"); |
| 617 |
_tagNameMap.put(TAG_SERIAL_NUMBER_FORMAT, "Serial Number Format"); |
| 618 |
_tagNameMap.put(TAG_SUPER_MACRO, "Super Macro"); |
| 619 |
_tagNameMap.put(TAG_DATE_STAMP_MODE, "Date Stamp Mode"); |
| 620 |
_tagNameMap.put(TAG_MY_COLORS, "My Colors"); |
| 621 |
_tagNameMap.put(TAG_FIRMWARE_REVISION, "Firmware Revision"); |
| 622 |
_tagNameMap.put(TAG_CATEGORIES, "Categories"); |
| 623 |
_tagNameMap.put(TAG_FACE_DETECT_ARRAY_1, "Face Detect Array 1"); |
| 624 |
_tagNameMap.put(TAG_FACE_DETECT_ARRAY_2, "Face Detect Array 2"); |
| 625 |
_tagNameMap.put(TAG_AF_INFO_ARRAY_2, "AF Info Array 2"); |
| 626 |
_tagNameMap.put(TAG_IMAGE_UNIQUE_ID, "Image Unique ID"); |
| 627 |
_tagNameMap.put(TAG_RAW_DATA_OFFSET, "Raw Data Offset"); |
| 628 |
_tagNameMap.put(TAG_ORIGINAL_DECISION_DATA_OFFSET, "Original Decision Data Offset"); |
| 629 |
_tagNameMap.put(TAG_CUSTOM_FUNCTIONS_1D_ARRAY, "Custom Functions (1D) Array"); |
| 630 |
_tagNameMap.put(TAG_PERSONAL_FUNCTIONS_ARRAY, "Personal Functions Array"); |
| 631 |
_tagNameMap.put(TAG_PERSONAL_FUNCTION_VALUES_ARRAY, "Personal Function Values Array"); |
| 632 |
_tagNameMap.put(TAG_FILE_INFO_ARRAY, "File Info Array"); |
| 633 |
_tagNameMap.put(TAG_AF_POINTS_IN_FOCUS_1D, "AF Points in Focus (1D)"); |
| 634 |
_tagNameMap.put(TAG_LENS_MODEL, "Lens Model"); |
| 635 |
_tagNameMap.put(TAG_SERIAL_INFO_ARRAY, "Serial Info Array"); |
| 636 |
_tagNameMap.put(TAG_DUST_REMOVAL_DATA, "Dust Removal Data"); |
| 637 |
_tagNameMap.put(TAG_CROP_INFO, "Crop Info"); |
| 638 |
_tagNameMap.put(TAG_CUSTOM_FUNCTIONS_ARRAY_2, "Custom Functions Array 2"); |
| 639 |
_tagNameMap.put(TAG_ASPECT_INFO_ARRAY, "Aspect Information Array"); |
| 640 |
_tagNameMap.put(TAG_PROCESSING_INFO_ARRAY, "Processing Information Array"); |
| 641 |
_tagNameMap.put(TAG_TONE_CURVE_TABLE, "Tone Curve Table"); |
| 642 |
_tagNameMap.put(TAG_SHARPNESS_TABLE, "Sharpness Table"); |
| 643 |
_tagNameMap.put(TAG_SHARPNESS_FREQ_TABLE, "Sharpness Frequency Table"); |
| 644 |
_tagNameMap.put(TAG_WHITE_BALANCE_TABLE, "White Balance Table"); |
| 645 |
_tagNameMap.put(TAG_COLOR_BALANCE_ARRAY, "Color Balance Array"); |
| 646 |
_tagNameMap.put(TAG_MEASURED_COLOR_ARRAY, "Measured Color Array"); |
| 647 |
_tagNameMap.put(TAG_COLOR_TEMPERATURE, "Color Temperature"); |
| 648 |
_tagNameMap.put(TAG_CANON_FLAGS_ARRAY, "Canon Flags Array"); |
| 649 |
_tagNameMap.put(TAG_MODIFIED_INFO_ARRAY, "Modified Information Array"); |
| 650 |
_tagNameMap.put(TAG_TONE_CURVE_MATCHING, "Tone Curve Matching"); |
| 651 |
_tagNameMap.put(TAG_WHITE_BALANCE_MATCHING, "White Balance Matching"); |
| 652 |
_tagNameMap.put(TAG_COLOR_SPACE, "Color Space"); |
| 653 |
_tagNameMap.put(TAG_PREVIEW_IMAGE_INFO_ARRAY, "Preview Image Info Array"); |
| 654 |
_tagNameMap.put(TAG_VRD_OFFSET, "VRD Offset"); |
| 655 |
_tagNameMap.put(TAG_SENSOR_INFO_ARRAY, "Sensor Information Array"); |
| 656 |
_tagNameMap.put(TAG_COLOR_DATA_ARRAY_2, "Color Data Array 1"); |
| 657 |
_tagNameMap.put(TAG_CRW_PARAM, "CRW Parameters"); |
| 658 |
_tagNameMap.put(TAG_COLOR_INFO_ARRAY_2, "Color Data Array 2"); |
| 659 |
_tagNameMap.put(TAG_BLACK_LEVEL, "Black Level"); |
| 660 |
_tagNameMap.put(TAG_CUSTOM_PICTURE_STYLE_FILE_NAME, "Custom Picture Style File Name"); |
| 661 |
_tagNameMap.put(TAG_COLOR_INFO_ARRAY, "Color Info Array"); |
| 662 |
_tagNameMap.put(TAG_VIGNETTING_CORRECTION_ARRAY_1, "Vignetting Correction Array 1"); |
| 663 |
_tagNameMap.put(TAG_VIGNETTING_CORRECTION_ARRAY_2, "Vignetting Correction Array 2"); |
| 664 |
_tagNameMap.put(TAG_LIGHTING_OPTIMIZER_ARRAY, "Lighting Optimizer Array"); |
| 665 |
_tagNameMap.put(TAG_LENS_INFO_ARRAY, "Lens Info Array"); |
| 666 |
_tagNameMap.put(TAG_AMBIANCE_INFO_ARRAY, "Ambiance Info Array"); |
| 667 |
_tagNameMap.put(TAG_FILTER_INFO_ARRAY, "Filter Info Array"); |
| 668 |
} |
| 669 |
|
| 670 |
public CanonMakernoteDirectory() |
| 671 |
{ |
| 672 |
this.setDescriptor(new CanonMakernoteDescriptor(this)); |
| 673 |
} |
| 674 |
|
| 675 |
@Override |
| 676 |
@NotNull |
| 677 |
public String getName() |
| 678 |
{ |
| 679 |
return "Canon Makernote"; |
| 680 |
} |
| 681 |
|
| 682 |
@Override |
| 683 |
@NotNull |
| 684 |
protected HashMap<Integer, String> getTagNameMap() |
| 685 |
{ |
| 686 |
return _tagNameMap; |
| 687 |
} |
| 688 |
|
| 689 |
@Override |
| 690 |
public void setObjectArray(int tagType, @NotNull Object array) |
| 691 |
{ |
| 692 |
|
| 693 |
|
| 694 |
if (!(array instanceof int[])) { |
| 695 |
|
| 696 |
super.setObjectArray(tagType, array); |
| 697 |
return; |
| 698 |
} |
| 699 |
|
| 700 |
|
| 701 |
|
| 702 |
|
| 703 |
|
| 704 |
switch (tagType) { |
| 705 |
case TAG_CAMERA_SETTINGS_ARRAY: { |
| 706 |
int[] ints = (int[])array; |
| 707 |
for (int i = 0; i < ints.length; i++) |
| 708 |
setInt(CameraSettings.OFFSET + i, ints[i]); |
| 709 |
break; |
| 710 |
} |
| 711 |
case TAG_FOCAL_LENGTH_ARRAY: { |
| 712 |
int[] ints = (int[])array; |
| 713 |
for (int i = 0; i < ints.length; i++) |
| 714 |
setInt(FocalLength.OFFSET + i, ints[i]); |
| 715 |
break; |
| 716 |
} |
| 717 |
case TAG_SHOT_INFO_ARRAY: { |
| 718 |
int[] ints = (int[])array; |
| 719 |
for (int i = 0; i < ints.length; i++) |
| 720 |
setInt(ShotInfo.OFFSET + i, ints[i]); |
| 721 |
break; |
| 722 |
} |
| 723 |
case TAG_PANORAMA_ARRAY: { |
| 724 |
int[] ints = (int[])array; |
| 725 |
for (int i = 0; i < ints.length; i++) |
| 726 |
setInt(Panorama.OFFSET + i, ints[i]); |
| 727 |
break; |
| 728 |
} |
| 729 |
|
| 730 |
|
| 731 |
|
| 732 |
|
| 733 |
|
| 734 |
|
| 735 |
|
| 736 |
case TAG_AF_INFO_ARRAY: { |
| 737 |
|
| 738 |
|
| 739 |
|
| 740 |
|
| 741 |
|
| 742 |
|
| 743 |
|
| 744 |
|
| 745 |
|
| 746 |
|
| 747 |
|
| 748 |
|
| 749 |
|
| 750 |
|
| 751 |
|
| 752 |
int[] values = (int[])array; |
| 753 |
int numafpoints = values[0]; |
| 754 |
int tagnumber = 0; |
| 755 |
for (int i = 0; i < values.length; i++) |
| 756 |
{ |
| 757 |
|
| 758 |
if (AFInfo.OFFSET + tagnumber == AFInfo.TAG_AF_AREA_X_POSITIONS || |
| 759 |
AFInfo.OFFSET + tagnumber == AFInfo.TAG_AF_AREA_Y_POSITIONS) |
| 760 |
{ |
| 761 |
|
| 762 |
if (values.length - 1 >= (i + numafpoints)) |
| 763 |
{ |
| 764 |
short[] areaPositions = new short[numafpoints]; |
| 765 |
for (int j = 0; j < areaPositions.length; j++) |
| 766 |
areaPositions[j] = (short)values[i + j]; |
| 767 |
|
| 768 |
super.setObjectArray(AFInfo.OFFSET + tagnumber, areaPositions); |
| 769 |
} |
| 770 |
i += numafpoints - 1; |
| 771 |
} |
| 772 |
else if (AFInfo.OFFSET + tagnumber == AFInfo.TAG_AF_POINTS_IN_FOCUS) |
| 773 |
{ |
| 774 |
short[] pointsInFocus = new short[((numafpoints + 15) / 16)]; |
| 775 |
|
| 776 |
|
| 777 |
if (values.length - 1 >= (i + pointsInFocus.length)) |
| 778 |
{ |
| 779 |
for (int j = 0; j < pointsInFocus.length; j++) |
| 780 |
pointsInFocus[j] = (short)values[i + j]; |
| 781 |
|
| 782 |
super.setObjectArray(AFInfo.OFFSET + tagnumber, pointsInFocus); |
| 783 |
} |
| 784 |
i += pointsInFocus.length - 1; |
| 785 |
} |
| 786 |
else |
| 787 |
super.setObjectArray(AFInfo.OFFSET + tagnumber, values[i]); |
| 788 |
tagnumber++; |
| 789 |
} |
| 790 |
break; |
| 791 |
} |
| 792 |
default: { |
| 793 |
|
| 794 |
super.setObjectArray(tagType, array); |
| 795 |
break; |
| 796 |
} |
| 797 |
} |
| 798 |
} |
| 799 |
} |