|
5 | 5 | """ |
6 | 6 |
|
7 | 7 | TAGS = { |
| 8 | + 0x0001: ('CameraSettings',), # see CAMERA_SETTINGS |
| 9 | + 0x0002: ('FocalLength',), # see FOCAL_LENGTH |
8 | 10 | 0x0003: ('FlashInfo',), |
| 11 | + 0x0004: ('ShotInfo',), # see SHOT_INFO |
9 | 12 | 0x0006: ('ImageType', ), |
10 | 13 | 0x0007: ('FirmwareVersion', ), |
11 | 14 | 0x0008: ('ImageNumber', ), |
12 | 15 | 0x0009: ('OwnerName', ), |
13 | 16 | 0x000c: ('SerialNumber', ), |
14 | 17 | 0x000e: ('FileLength', ), |
| 18 | + 0x000d: ('CanonCameraInfo', ), # see |
15 | 19 | 0x0010: ('ModelID', { |
16 | 20 | 0x1010000: 'PowerShot A30', |
17 | 21 | 0x1040000: 'PowerShot S300 / Digital IXUS 300 / IXY Digital 300', |
|
161 | 165 | 0x3090000: 'PowerShot SX150 IS', |
162 | 166 | 0x3100000: 'PowerShot ELPH 510 HS / IXUS 1100 HS / IXY 51S', |
163 | 167 | 0x3110000: 'PowerShot S100 (new)', |
164 | | - 0x3130000: 'PowerShot SX40 HS', |
165 | 168 | 0x3120000: 'PowerShot ELPH 310 HS / IXUS 230 HS / IXY 600F', |
| 169 | + 0x3130000: 'PowerShot SX40 HS', |
166 | 170 | 0x3160000: 'PowerShot A1300', |
167 | 171 | 0x3170000: 'PowerShot A810', |
168 | 172 | 0x3180000: 'PowerShot ELPH 320 HS / IXUS 240 HS / IXY 420F', |
|
220 | 224 | 0x3890000: 'PowerShot ELPH 170 IS / IXUS 170', |
221 | 225 | 0x3910000: 'PowerShot SX410 IS', |
222 | 226 | 0x4040000: 'PowerShot G1', |
| 227 | + |
223 | 228 | 0x6040000: 'PowerShot S100 / Digital IXUS / IXY Digital', |
| 229 | + |
224 | 230 | 0x4007d673: 'DC19/DC21/DC22', |
225 | 231 | 0x4007d674: 'XH A1', |
226 | 232 | 0x4007d675: 'HV10', |
|
250 | 256 | 0x4007da90: 'HF S20/S21/S200', |
251 | 257 | 0x4007da92: 'FS31/FS36/FS37/FS300/FS305/FS306/FS307', |
252 | 258 | 0x4007dda9: 'HF G25', |
| 259 | + |
253 | 260 | 0x80000001: 'EOS-1D', |
254 | 261 | 0x80000167: 'EOS-1DS', |
255 | 262 | 0x80000168: 'EOS 10D', |
|
293 | 300 | 0x80000326: 'EOS Rebel T5i / 700D / Kiss X7i', |
294 | 301 | 0x80000327: 'EOS Rebel T5 / 1200D / Kiss X70', |
295 | 302 | 0x80000331: 'EOS M', |
296 | | - 0x80000355: 'EOS M2', |
297 | 303 | 0x80000346: 'EOS Rebel SL1 / 100D / Kiss X7', |
298 | 304 | 0x80000347: 'EOS Rebel T6s / 760D / 8000D', |
| 305 | + 0x80000349: 'EOS 5D Mark IV', |
| 306 | + 0x80000355: 'EOS M2', |
299 | 307 | 0x80000382: 'EOS 5DS', |
300 | 308 | 0x80000393: 'EOS Rebel T6i / 750D / Kiss X8i', |
301 | 309 | 0x80000401: 'EOS 5DS R', |
302 | 310 | }), |
| 311 | + 0x0012: ('AFInfo', ), |
303 | 312 | 0x0013: ('ThumbnailImageValidArea', ), |
304 | 313 | 0x0015: ('SerialNumberFormat', { |
305 | 314 | 0x90000000: 'Format 1', |
|
316 | 325 | 2: 'Date & Time', |
317 | 326 | }), |
318 | 327 | 0x001e: ('FirmwareRevision', ), |
| 328 | + 0x0026: ('AFInfo2', ), # see AF_INFO_2 |
319 | 329 | 0x0028: ('ImageUniqueID', ), |
| 330 | + 0x0035: ('TimeInfo', ), |
| 331 | + 0x0093: ('FileInfo', ), # see FILE_INFO |
320 | 332 | 0x0095: ('LensModel', ), |
321 | | - 0x0096: ('InternalSerialNumber ', ), |
322 | | - 0x0097: ('DustRemovalData ', ), |
323 | | - 0x0098: ('CropInfo ', ), |
| 333 | + 0x0096: ('InternalSerialNumber', ), |
| 334 | + 0x0097: ('DustRemovalData', ), |
| 335 | + 0x0098: ('CropInfo', ), |
324 | 336 | 0x009a: ('AspectInfo', ), |
325 | 337 | 0x00b4: ('ColorSpace', { |
326 | 338 | 1: 'sRGB', |
327 | 339 | 2: 'Adobe RGB' |
328 | 340 | }), |
| 341 | + 0x4019: ('LensInfo', ), |
| 342 | + |
329 | 343 | } |
330 | 344 |
|
331 | 345 | # this is in element offset, name, optional value dictionary format |
|
523 | 537 | SHOT_INFO = { |
524 | 538 | 7: ('WhiteBalance', { |
525 | 539 | 0: 'Auto', |
526 | | - 1: 'Sunny', |
| 540 | + 1: 'Daylight', |
527 | 541 | 2: 'Cloudy', |
528 | 542 | 3: 'Tungsten', |
529 | 543 | 4: 'Fluorescent', |
530 | 544 | 5: 'Flash', |
531 | | - 6: 'Custom' |
| 545 | + 6: 'Custom', |
| 546 | + 7: 'Black & White', |
| 547 | + 8: 'Shade', |
| 548 | + 9: 'Manual Temperature (Kelvin)', |
| 549 | + 10: 'PC Set 1', |
| 550 | + 11: 'PC Set 2', |
| 551 | + 12: 'PC Set 3', |
| 552 | + 14: 'Daylight Fluorescent', |
| 553 | + 15: 'Custom 1', |
| 554 | + 16: 'Custom 2', |
| 555 | + 17: 'Underwater', |
| 556 | + 18: 'Custom 3', |
| 557 | + 19: 'Custom 4', |
| 558 | + 20: 'PC Set 4', |
| 559 | + 21: 'PC Set 5', |
| 560 | + 23: 'Auto (ambience priority)', |
532 | 561 | }), |
533 | 562 | 8: ('SlowShutter', { |
534 | 563 | -1: 'n/a', |
|
563 | 592 |
|
564 | 593 | # 0x0026 |
565 | 594 | AF_INFO_2 = { |
566 | | - 2: ('AFAreaMode', { |
| 595 | + 1: ('AFAreaMode', { |
567 | 596 | 0: 'Off (Manual Focus)', |
568 | 597 | 2: 'Single-point AF', |
569 | 598 | 4: 'Multi-point AF or AI AF', |
|
575 | 604 | 11: 'Flexizone Multi', |
576 | 605 | 13: 'Flexizone Single', |
577 | 606 | }), |
578 | | - 3: ('NumAFPoints', ), |
579 | | - 4: ('ValidAFPoints', ), |
580 | | - 5: ('CanonImageWidth', ), |
| 607 | + 2: ('NumAFPoints', ), |
| 608 | + 3: ('ValidAFPoints', ), |
| 609 | + 4: ('CanonImageWidth', ), |
| 610 | + 5: ('CanonImageHeight', ), |
| 611 | + 6: ('AFImageWidth', ), |
| 612 | + 7: ('AFImageHeight', ), |
| 613 | + 8: ('AFAreaWidths', ), |
| 614 | + 9: ('AFAreaHeights', ), |
| 615 | + 10: ('AFAreaXPositions', ), |
| 616 | + 11: ('AFAreaYPositions', ), |
| 617 | + 12: ('AFPointsInFocus', ), |
| 618 | + 13: ('AFPointsSelected', ), |
| 619 | + 14: ('PrimaryAFPoint', ), |
581 | 620 | } |
| 621 | +AF_INFO_2 = {k+1: v for k, v in AF_INFO_2.items()} |
582 | 622 |
|
583 | 623 | # 0x0093 |
584 | 624 | FILE_INFO = { |
585 | 625 | 1: ('FileNumber', ), |
586 | | - 3: ('BracketMode', { |
| 626 | + 2: ('BracketMode', { |
587 | 627 | 0: 'Off', |
588 | 628 | 1: 'AEB', |
589 | 629 | 2: 'FEB', |
@@ -674,7 +714,7 @@ def convert_temp(value): |
674 | 714 | # byte offset: (item name, data item type, decoding map). |
675 | 715 | # Note that the data item type is fed directly to struct.unpack at the |
676 | 716 | # specified offset. |
677 | | -CAMERA_INFO_TAG_NAME = 'MakerNote Tag 0x000D' |
| 717 | +CAMERA_INFO_TAG_NAME = 'MakerNote CanonCameraInfo' |
678 | 718 |
|
679 | 719 | CAMERA_INFO_5D = { |
680 | 720 | 23: ('CameraTemperature', '<B', convert_temp), |
@@ -708,4 +748,5 @@ def convert_temp(value): |
708 | 748 | r'EOS 5D Mark II$': CAMERA_INFO_5DMKII, |
709 | 749 | r'EOS 5D Mark III$': CAMERA_INFO_5DMKIII, |
710 | 750 | r'\b(600D|REBEL T3i|Kiss X5)\b': CAMERA_INFO_600D, |
| 751 | + r'EOS 5D Mark IV$': CAMERA_INFO_5DMKIII, |
711 | 752 | } |
0 commit comments