Project

General

Profile

Feature #894 » 894-5.diff

Ben Touchette, 15 Sep 2016 14:11

View differences:

trunk/src/canonmn.cpp (revision 4493) → trunk/src/canonmn.cpp (working copy)
1312 1312
        return tagInfoSi_;
1313 1313
    }
1314 1314

  
1315
    //! HighlightTonePriority, tag 0x0007
1316
    extern const TagDetails canonCiHighlightTonePriority[] = {
1317
        { 0, N_("Disabled")  },
1318
        { 1, N_("Enabled")   }
1319
    };
1320

  
1321
    // Canon Camera Info Tag
1322
    const TagInfo CanonMakerNote::tagInfoCiHtp_[] = {
1323
        TagInfo(0x0007, "HighlightTonePriority", N_("Highlight Tone Priority"), N_("Highlight Tone Priority"), canonCiId, makerTags, unsignedByte, 1, EXV_PRINT_TAG(canonCiHighlightTonePriority)),
1324
        // End of list marker
1325
        TagInfo(0xffff, "(UnknownCanonCiTag)", "(UnknownCanonCiTag)", N_("Unknown Canon Camera Info 1 tag"), canonCiId, makerTags, unsignedShort, 1, printValue)
1326
    };
1327
    const TagInfo CanonMakerNote::tagInfoCi_[] = {
1328
        // End of list marker
1329
        TagInfo(0xffff, "(UnknownCanonCiTag)", "(UnknownCanonCiTag)", N_("Unknown Canon Camera Info 1 tag"), canonCiId, makerTags, unsignedShort, 1, printValue)
1330
    };
1331

  
1332
    const long CanonMakerNote::supportedHTPCameraIds[] = {
1333
        /*  1 5D MK II   */ 0x80000218,
1334
        /*  2 7D         */ 0x80000250,
1335
        /*  3 50D        */ 0x80000261,
1336
        /*  4 1D X       */ 0x80000269,
1337
        /*  5 550D       */ 0x80000270,
1338
        /*  6 1D MK IV   */ 0x80000281,
1339
        /*  7 5D MK III  */ 0x80000285,
1340
        /*  8 600D       */ 0x80000286,
1341
        /*  9 60D        */ 0x80000287,
1342
        /* 10 7D MK II   */ 0x80000289,
1343
        /* 11 650D       */ 0x80000301,
1344
        /* 12 6D         */ 0x80000302,
1345
        /* 13 70D        */ 0x80000325,
1346
        /* 14 700D       */ 0x80000326,
1347
        /* 15 1D X MK II */ 0x80000328,
1348
        /* 16 80D        */ 0x80000350,
1349
        /* 17 5DS        */ 0x80000382,
1350
        /* 18 5DS        */ 0x80000393,
1351
        /* 19 5DS R      */ 0x80000401,
1352
        /* 20 1300D      */ 0x80000404
1353
    };
1354

  
1355
    const TagInfo* CanonMakerNote::tagListCi()
1356
    {
1357
        long modelId = 0x0;
1358
        int camera_num = sizeof(supportedHTPCameraIds) / sizeof(supportedHTPCameraIds[0]);
1359
        for (long index = 0; index < camera_num; index++) {
1360
            if (modelId == supportedHTPCameraIds[index]) {
1361
                return tagInfoCiHtp_;
1362
            }
1363
        }
1364

  
1365
        return tagInfoCi_;
1366
    }
1367

  
1315 1368
    //! PanoramaDirection, tag 0x0005
1316 1369
    extern const TagDetails canonPaDirection[] = {
1317 1370
        { 0, N_("Left to right")          },
trunk/src/canonmn_int.hpp (revision 4493) → trunk/src/canonmn_int.hpp (working copy)
63 63
        static const TagInfo* tagListCs();
64 64
        //! Return read-only list of built-in Canon Shot Info tags
65 65
        static const TagInfo* tagListSi();
66
        //! Return read-only list of built-in Canon Camera Info tags
67
        static const TagInfo* tagListCi();
66 68
        //! Return read-only list of built-in Canon Panorama tags
67 69
        static const TagInfo* tagListPa();
68 70
        //! Return read-only list of built-in Canon Custom Function tags
......
108 110
        static std::ostream& printSi0x0017(std::ostream& os, const Value& value, const ExifData*);
109 111
        //! Focus Distance
110 112
        static std::ostream& printFiFocusDistance(std::ostream& os, const Value& value, const ExifData*);
113
        //! Model Id
114
        static std::ostream& printModelId(std::ostream& os, const Value& value, const ExifData*);
111 115
        //@}
112 116

  
113 117
    private:
114 118
        // DATA
119
        static const long supportedHTPCameraIds[];
115 120

  
116 121
        //! Tag information
117 122
        static const TagInfo tagInfo_[];
118 123
        static const TagInfo tagInfoCs_[];
119 124
        static const TagInfo tagInfoSi_[];
125
        static const TagInfo tagInfoCi_[];
126
        static const TagInfo tagInfoCiHtp_[];
120 127
        static const TagInfo tagInfoCf_[];
121 128
        static const TagInfo tagInfoPi_[];
122 129
        static const TagInfo tagInfoFi_[];
trunk/src/tags.cpp (revision 4493) → trunk/src/tags.cpp (working copy)
106 106
        { canonFiId,       "Makernote", "CanonFi",      CanonMakerNote::tagListFi      },
107 107
        { canonPaId,       "Makernote", "CanonPa",      CanonMakerNote::tagListPa      },
108 108
        { canonPrId,       "Makernote", "CanonPr",      CanonMakerNote::tagListPr      },
109
        { canonCiId,       "Makernote", "CanonCi",      CanonMakerNote::tagListCi      },
109 110
        { casioId,         "Makernote", "Casio",        CasioMakerNote::tagList        },
110 111
        { casio2Id,        "Makernote", "Casio2",       Casio2MakerNote::tagList       },
111 112
        { fujiId,          "Makernote", "Fujifilm",     FujiMakerNote::tagList         },
trunk/src/tags_int.hpp (revision 4493) → trunk/src/tags_int.hpp (working copy)
78 78
        canonId,
79 79
        canonCsId,
80 80
        canonSiId,
81
        canonCiId,
81 82
        canonCfId,
82 83
        canonPiId,
83 84
        canonPaId,
trunk/src/tiffimage.cpp (revision 4493) → trunk/src/tiffimage.cpp (working copy)
703 703
        { 0, ttUnsignedShort, 1 }
704 704
    };
705 705

  
706
    //! Canon Camera Info binary array - configuration
707
    extern const ArrayCfg canonCiCfg = {
708
        canonCiId,        // Group for the elements
709
        invalidByteOrder, // Use byte order from parent
710
        ttUndefined,      // Type for array entry and size element
711
        notEncrypted,     // Not encrypted
712
        false,            // With size element
713
        false,            // No fillers
714
        false,            // Don't concatenate gaps
715
        { 0, ttUnsignedByte, 1 }
716
    };
717

  
706 718
    //! Canon Panorama binary array - configuration
707 719
    extern const ArrayCfg canonPaCfg = {
708 720
        canonPaId,        // Group for the elements
......
1549 1561
        { Tag::root, canonCsId,        canonId,          0x0001    },
1550 1562
        { Tag::root, canonSiId,        canonId,          0x0004    },
1551 1563
        { Tag::root, canonPaId,        canonId,          0x0005    },
1564
        { Tag::root, canonCiId,        canonId,          0x000d    },
1552 1565
        { Tag::root, canonCfId,        canonId,          0x000f    },
1553 1566
        { Tag::root, canonPiId,        canonId,          0x0012    },
1554 1567
        { Tag::root, canonFiId,        canonId,          0x0093    },
......
1881 1894
        {    0x0001, canonId,          EXV_BINARY_ARRAY(canonCsCfg, canonCsDef)  },
1882 1895
        {    0x0004, canonId,          EXV_SIMPLE_BINARY_ARRAY(canonSiCfg)       },
1883 1896
        {    0x0005, canonId,          EXV_SIMPLE_BINARY_ARRAY(canonPaCfg)       },
1897
        {    0x000d, canonId,          EXV_SIMPLE_BINARY_ARRAY(canonCiCfg)       },
1884 1898
        {    0x000f, canonId,          EXV_SIMPLE_BINARY_ARRAY(canonCfCfg)       },
1885 1899
        {    0x0012, canonId,          EXV_SIMPLE_BINARY_ARRAY(canonPiCfg)       },
1886 1900
        {    0x0093, canonId,          EXV_BINARY_ARRAY(canonFiCfg, canonFiDef)  },
......
1892 1906
        {  Tag::all, canonCsId,        newTiffBinaryElement                      },
1893 1907
        {  Tag::all, canonSiId,        newTiffBinaryElement                      },
1894 1908
        {  Tag::all, canonPaId,        newTiffBinaryElement                      },
1909
        {  Tag::all, canonCiId,        newTiffBinaryElement                      },
1895 1910
        {  Tag::all, canonCfId,        newTiffBinaryElement                      },
1896 1911
        {  Tag::all, canonPiId,        newTiffBinaryElement                      },
1897 1912
        {  Tag::all, canonFiId,        newTiffBinaryElement                      },
    (1-1/1)