[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:40:55 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=dbc01d1

The following commit has been merged in the master branch:
commit dbc01d16cc5e416a658cf212130658f8a09b9625
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Sun Nov 29 07:16:07 2009 +0000

    #620: Added support for Nikon Vibration Reduction and Picture Control Tags.
---
 src/makernote_int.hpp |  5 ++-
 src/nikonmn.cpp       | 75 +++++++++++++++++++++++++++++++++++++++++++
 src/nikonmn.hpp       |  8 +++++
 src/tags.cpp          |  2 ++
 src/tiffcomposite.cpp |  4 ++-
 src/tiffimage.cpp     | 45 +++++++++++++++++++++++++-
 src/types.hpp         | 89 +++++++++++++++++++++++++++++++++++++++------------
 7 files changed, 204 insertions(+), 24 deletions(-)

diff --git a/src/makernote_int.hpp b/src/makernote_int.hpp
index 304496c..3191606 100644
--- a/src/makernote_int.hpp
+++ b/src/makernote_int.hpp
@@ -99,7 +99,10 @@ namespace Exiv2 {
         const uint16_t nikoncb2b = 307; //!< Nikon Color Balance 2 Tags
         const uint16_t nikoncb3  = 308; //!< Nikon Color Balance 3 Tags
         const uint16_t nikoncb4  = 309; //!< Nikon Color Balance 4 Tags
-        const uint16_t canonfi   = 310; //!< Canon File Info
+        const uint16_t nikonvr   = 310; //!< Nikon Vibration Reduction Tags
+        const uint16_t nikonpc   = 311; //!< Nikon Picture Control Tags
+
+        const uint16_t canonfi   = 320; //!< Canon File Info
     }
 
 // *****************************************************************************
diff --git a/src/nikonmn.cpp b/src/nikonmn.cpp
index 9a45b69..2b178d9 100644
--- a/src/nikonmn.cpp
+++ b/src/nikonmn.cpp
@@ -621,6 +621,81 @@ namespace Exiv2 {
         { 2, N_("D/M/Y") }
     };
 
+    //! OnOff
+    extern const TagDetails nikonOnOff[] = {
+        {  1, N_("On")  },
+        {  2, N_("Off") }
+    };
+
+    // Nikon3 Vibration Reduction Tag Info
+    const TagInfo Nikon3MakerNote::tagInfoVr_[] = {
+        TagInfo(0, "Version", N_("Version"), N_("Version"), nikonVrIfdId, makerTags, undefined, printExifVersion),
+        TagInfo(4, "VibrationReduction", N_("Vibration Reduction"), N_("Vibration reduction"), nikonVrIfdId, makerTags, unsignedByte, EXV_PRINT_TAG(nikonOnOff)),
+        // End of list marker
+        TagInfo(0xffff, "(UnknownNikonVrTag)", "(UnknownNikonVrTag)", N_("Unknown Nikon Vibration Reduction Tag"), nikonVrIfdId, makerTags, invalidTypeId, printValue)
+    };
+
+    const TagInfo* Nikon3MakerNote::tagListVr()
+    {
+        return tagInfoVr_;
+    }
+
+    //! Adjust
+    extern const TagDetails nikonAdjust[] = {
+        {  0, N_("Default Settings") },
+        {  1, N_("Quick Adjust")     },
+        {  2, N_("Full Control")     }
+    };
+
+    //! FilterEffect
+    extern const TagDetails nikonFilterEffect[] = {
+        { 0x80, N_("Off")    },
+        { 0x81, N_("Yellow") },
+        { 0x82, N_("Orange") },
+        { 0x83, N_("Red")    },
+        { 0x84, N_("Green")  },
+        { 0xff, N_("n/a")    }
+    };
+
+    //! ToningEffect
+    extern const TagDetails nikonToningEffect[] = {
+        { 0x80, N_("B&W")         },
+        { 0x81, N_("Sepia")       },
+        { 0x82, N_("Cyanotype")   },
+        { 0x83, N_("Red")         },
+        { 0x84, N_("Yellow")      },
+        { 0x85, N_("Green")       },
+        { 0x86, N_("Blue-green")  },
+        { 0x87, N_("Blue")        },
+        { 0x88, N_("Purple-blue") },
+        { 0x89, N_("Red-purple")  },
+        { 0xff, N_("n/a")         }
+    };
+
+    // Nikon3 Picture Control Tag Info
+    const TagInfo Nikon3MakerNote::tagInfoPc_[] = {
+        TagInfo( 0, "Version", N_("Version"), N_("Version"), nikonPcIfdId, makerTags, undefined, printExifVersion),
+        TagInfo( 4, "Name", N_("Name"), N_("Name"), nikonPcIfdId, makerTags, asciiString, printValue),
+        TagInfo(24, "Base", N_("Base"), N_("Base"), nikonPcIfdId, makerTags, asciiString, printValue),
+        TagInfo(48, "Adjust", N_("Adjust"), N_("Adjust"), nikonPcIfdId, makerTags, unsignedByte, EXV_PRINT_TAG(nikonAdjust)),
+        TagInfo(49, "QuickAdjust", N_("Quick Adjust"), N_("Quick adjust"), nikonPcIfdId, makerTags, unsignedByte, printValue),
+        TagInfo(50, "Sharpness", N_("Sharpness"), N_("Sharpness"), nikonPcIfdId, makerTags, unsignedByte, printValue),
+        TagInfo(51, "Contrast", N_("Contrast"), N_("Contrast"), nikonPcIfdId, makerTags, unsignedByte, printValue),
+        TagInfo(52, "Brightness", N_("Brightness"), N_("Brightness"), nikonPcIfdId, makerTags, unsignedByte, printValue),
+        TagInfo(53, "Saturation", N_("Saturation"), N_("Saturation"), nikonPcIfdId, makerTags, unsignedByte, printValue),
+        TagInfo(54, "HueAdjustment", N_("Hue Adjustment"), N_("Hue adjustment"), nikonPcIfdId, makerTags, unsignedByte, printValue),
+        TagInfo(55, "FilterEffect", N_("Filter Effect"), N_("Filter effect"), nikonPcIfdId, makerTags, unsignedByte, EXV_PRINT_TAG(nikonFilterEffect)),
+        TagInfo(56, "ToningEffect", N_("Toning Effect"), N_("Toning effect"), nikonPcIfdId, makerTags, unsignedByte, EXV_PRINT_TAG(nikonToningEffect)),
+        TagInfo(57, "ToningSaturation", N_("Toning Saturation"), N_("Toning saturation"), nikonPcIfdId, makerTags, unsignedByte, printValue),
+        // End of list marker
+        TagInfo(0xffff, "(UnknownNikonPcTag)", "(UnknownNikonPcTag)", N_("Unknown Nikon Picture Control Tag"), nikonPcIfdId, makerTags, invalidTypeId, printValue)
+    };
+
+    const TagInfo* Nikon3MakerNote::tagListPc()
+    {
+        return tagInfoPc_;
+    }
+
     // Nikon3 World Time Tag Info
     const TagInfo Nikon3MakerNote::tagInfoWt_[] = {
         TagInfo(0, "Timezone", N_("Timezone"), N_("Timezone"), nikonWtIfdId, makerTags, signedShort, printValue),
diff --git a/src/nikonmn.hpp b/src/nikonmn.hpp
index 250a96e..b08cf5a 100644
--- a/src/nikonmn.hpp
+++ b/src/nikonmn.hpp
@@ -110,6 +110,10 @@ namespace Exiv2 {
     public:
         //! Return read-only list of built-in Nikon3 tags
         static const TagInfo* tagList();
+        //! Return read-only list of built-in Vibration Reduction tags
+        static const TagInfo* tagListVr();
+        //! Return read-only list of built-in Picture Control tags
+        static const TagInfo* tagListPc();
         //! Return read-only list of built-in World time tags
         static const TagInfo* tagListWt();
         //! Return read-only list of built-in ISO info tags
@@ -171,6 +175,10 @@ namespace Exiv2 {
     private:
         //! Tag information
         static const TagInfo tagInfo_[];
+        //! Vibration Reduction tag information
+        static const TagInfo tagInfoVr_[];
+        //! Picture Control tag information
+        static const TagInfo tagInfoPc_[];
         //! World Time tag information
         static const TagInfo tagInfoWt_[];
         //! ISO info tag information
diff --git a/src/tags.cpp b/src/tags.cpp
index da53270..ab692c9 100644
--- a/src/tags.cpp
+++ b/src/tags.cpp
@@ -124,6 +124,8 @@ namespace Exiv2 {
         { nikon2IfdId,       "Makernote", "Nikon2",       Nikon2MakerNote::tagList       },
         { nikon3IfdId,       "Makernote", "Nikon3",       Nikon3MakerNote::tagList       },
         { nikonPvIfdId,      "Makernote", "NikonPreview", ExifTags::ifdTagList           },
+        { nikonVrIfdId,      "Makernote", "NikonVr",      Nikon3MakerNote::tagListVr     },
+        { nikonPcIfdId,      "Makernote", "NikonPc",      Nikon3MakerNote::tagListPc     },
         { nikonWtIfdId,      "Makernote", "NikonWt",      Nikon3MakerNote::tagListWt     },
         { nikonIiIfdId,      "Makernote", "NikonIi",      Nikon3MakerNote::tagListIi     },
         { nikonCb1IfdId,     "Makernote", "NikonCb1",     Nikon3MakerNote::tagListCb1    },
diff --git a/src/tiffcomposite.cpp b/src/tiffcomposite.cpp
index 78e29ad..8441649 100644
--- a/src/tiffcomposite.cpp
+++ b/src/tiffcomposite.cpp
@@ -140,7 +140,9 @@ namespace Exiv2 {
         { 307, "NikonCb2b"    },
         { 308, "NikonCb3"     },
         { 309, "NikonCb4"     },
-        { 310, "CanonFi"      }
+        { 310, "NikonVr"      },
+        { 311, "NikonPc"      },
+        { 320, "CanonFi"      }
     };
 
     bool TiffGroupInfo::operator==(const uint16_t& group) const
diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp
index 0be6af9..c7b85b7 100644
--- a/src/tiffimage.cpp
+++ b/src/tiffimage.cpp
@@ -355,6 +355,40 @@ namespace Exiv2 {
         { 2, ttUnsignedLong, 1 }
     };
 
+    //! Nikon Vibration Reduction binary array - configuration
+    extern const ArrayCfg nikonVrCfg = {
+        Group::nikonvr,   // Group for the elements
+        invalidByteOrder, // Use byte order from parent
+        ttUndefined,      // Type for array entry
+        notEncrypted,     // Not encrypted
+        false,            // No size element
+        true,             // Write all tags
+        { 0, ttUnsignedByte,  1 }
+    };
+    //! Nikon Vibration Reduction binary array - definition
+    extern const ArrayDef nikonVrDef[] = {
+        { 0, ttUndefined,     4 }, // Version
+        { 7, ttUnsignedByte,  1 }  // The array contains 8 bytes
+    };
+
+    //! Nikon Picture Control binary array - configuration
+    extern const ArrayCfg nikonPcCfg = {
+        Group::nikonpc,   // Group for the elements
+        invalidByteOrder, // Use byte order from parent
+        ttUndefined,      // Type for array entry
+        notEncrypted,     // Not encrypted
+        false,            // No size element
+        true,             // Write all tags
+        { 0, ttUnsignedByte,  1 }
+    };
+    //! Nikon Picture Control binary array - definition
+    extern const ArrayDef nikonPcDef[] = {
+        {  0, ttUndefined,     4 }, // Version
+        {  4, ttAsciiString,  20 },
+        { 24, ttAsciiString,  20 },
+        { 57, ttUnsignedByte,  1 }  // The array contains 58 bytes
+    };
+
     //! Nikon World Time binary array - configuration
     extern const ArrayCfg nikonWtCfg = {
         Group::nikonwt,   // Group for the elements
@@ -368,7 +402,6 @@ namespace Exiv2 {
     //! Nikon World Time binary array - definition
     extern const ArrayDef nikonWtDef[] = {
         { 0, ttSignedShort,   1 },
-        { 2, ttUnsignedByte,  1 },
         { 3, ttUnsignedByte,  1 }
     };
 
@@ -650,6 +683,8 @@ namespace Exiv2 {
         { Tag::root, Group::nikon2mn,  Group::exif,      0x927c    },
         { Tag::root, Group::nikon3mn,  Group::exif,      0x927c    },
         { Tag::root, Group::nikonpv,   Group::nikon3mn,  0x0011    },
+        { Tag::root, Group::nikonvr,   Group::nikon3mn,  0x001f    },
+        { Tag::root, Group::nikonpc,   Group::nikon3mn,  0x0023    },
         { Tag::root, Group::nikonwt,   Group::nikon3mn,  0x0024    },
         { Tag::root, Group::nikonii,   Group::nikon3mn,  0x0025    },
         { Tag::root, Group::nikoncb1,  Group::nikon3mn,  0x0097    },
@@ -891,6 +926,8 @@ namespace Exiv2 {
         // Nikon3 makernote
         { Tag::next, Group::nikon3mn,  newTiffDirectory<Group::ignr>             },
         {    0x0011, Group::nikon3mn,  newTiffSubIfd<Group::nikonpv>             },
+        {    0x001f, Group::nikon3mn,  EXV_BINARY_ARRAY(nikonVrCfg, nikonVrDef)  },
+        {    0x0023, Group::nikon3mn,  EXV_BINARY_ARRAY(nikonPcCfg, nikonPcDef)  },
         {    0x0024, Group::nikon3mn,  EXV_BINARY_ARRAY(nikonWtCfg, nikonWtDef)  },
         {    0x0025, Group::nikon3mn,  EXV_BINARY_ARRAY(nikonIiCfg, nikonIiDef)  },
         {    0x0097, Group::nikon3mn,  EXV_COMPLEX_BINARY_ARRAY(nikonCbSet, nikonSelector) },
@@ -903,6 +940,12 @@ namespace Exiv2 {
         { Tag::next, Group::nikonpv,   newTiffDirectory<Group::ignr>             },
         {  Tag::all, Group::nikonpv,   newTiffEntry                              },
 
+        // Nikon3 vibration reduction
+        {  Tag::all, Group::nikonvr,   newTiffBinaryElement                      },
+
+        // Nikon3 picture control
+        {  Tag::all, Group::nikonpc,   newTiffBinaryElement                      },
+
         // Nikon3 world time
         {  Tag::all, Group::nikonwt,   newTiffBinaryElement                      },
 
diff --git a/src/types.hpp b/src/types.hpp
index d9d41e9..e1fcd7e 100644
--- a/src/types.hpp
+++ b/src/types.hpp
@@ -139,27 +139,74 @@ namespace Exiv2 {
     };
 
     //! Type to specify the IFD to which a metadata belongs
-    enum IfdId { ifdIdNotSet,
-                 ifd0Id, exifIfdId, gpsIfdId, iopIfdId, ifd1Id, ifd2Id,
-                 subImage1Id, subImage2Id, subImage3Id, subImage4Id,
-                 mnIfdId,
-                 canonIfdId, canonCsIfdId, canonSiIfdId, canonCfIfdId,
-                 canonPiIfdId, canonPaIfdId, canonFiIfdId,
-                 fujiIfdId,
-                 minoltaIfdId, minoltaCs5DIfdId, minoltaCs7DIfdId,
-                 minoltaCsOldIfdId, minoltaCsNewIfdId,
-                 nikon1IfdId, nikon2IfdId, nikon3IfdId, nikonPvIfdId, nikonWtIfdId,
-                 nikonIiIfdId, nikonLd1IfdId, nikonLd2IfdId, nikonLd3IfdId,
-                 nikonCb1IfdId, nikonCb2IfdId, nikonCb2aIfdId, nikonCb2bIfdId,
-                 nikonCb3IfdId, nikonCb4IfdId,
-                 olympusIfdId, olympus2IfdId, olympusCsIfdId, olympusEqIfdId,
-                 olympusRdIfdId, olympusRd2IfdId, olympusIpIfdId, olympusFiIfdId,
-                 olympusFe1IfdId, olympusFe2IfdId, olympusFe3IfdId, olympusFe4IfdId,
-                 olympusFe5IfdId, olympusFe6IfdId, olympusFe7IfdId, olympusFe8IfdId,
-                 olympusFe9IfdId, olympusRiIfdId,
-                 panasonicIfdId, panaRawIfdId,
-                 pentaxIfdId, sigmaIfdId, sonyIfdId,
-                 lastIfdId };
+    enum IfdId {
+        ifdIdNotSet,
+        ifd0Id,
+        exifIfdId,
+        gpsIfdId,
+        iopIfdId,
+        ifd1Id,
+        ifd2Id,
+        subImage1Id,
+        subImage2Id,
+        subImage3Id,
+        subImage4Id,
+        mnIfdId,
+        canonIfdId,
+        canonCsIfdId,
+        canonSiIfdId,
+        canonCfIfdId,
+        canonPiIfdId,
+        canonPaIfdId,
+        canonFiIfdId,
+        fujiIfdId,
+        minoltaIfdId,
+        minoltaCs5DIfdId,
+        minoltaCs7DIfdId,
+        minoltaCsOldIfdId,
+        minoltaCsNewIfdId,
+        nikon1IfdId,
+        nikon2IfdId,
+        nikon3IfdId,
+        nikonPvIfdId,
+        nikonVrIfdId,
+        nikonPcIfdId,
+        nikonWtIfdId,
+        nikonIiIfdId,
+        nikonLd1IfdId,
+        nikonLd2IfdId,
+        nikonLd3IfdId,
+        nikonCb1IfdId,
+        nikonCb2IfdId,
+        nikonCb2aIfdId,
+        nikonCb2bIfdId,
+        nikonCb3IfdId,
+        nikonCb4IfdId,
+        olympusIfdId,
+        olympus2IfdId,
+        olympusCsIfdId,
+        olympusEqIfdId,
+        olympusRdIfdId,
+        olympusRd2IfdId,
+        olympusIpIfdId,
+        olympusFiIfdId,
+        olympusFe1IfdId,
+        olympusFe2IfdId,
+        olympusFe3IfdId,
+        olympusFe4IfdId,
+        olympusFe5IfdId,
+        olympusFe6IfdId,
+        olympusFe7IfdId,
+        olympusFe8IfdId,
+        olympusFe9IfdId,
+        olympusRiIfdId,
+        panasonicIfdId,
+        panaRawIfdId,
+        pentaxIfdId,
+        sigmaIfdId,
+        sonyIfdId,
+        lastIfdId
+    };
 
     //! Container for binary data
     typedef std::vector<byte> Blob;

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list