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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:39:12 UTC 2017


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

The following commit has been merged in the master branch:
commit d705fade181e9e17129badcab18206b0cfe6e10c
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Sun Jan 20 17:50:03 2008 +0000

    Added printVersion (by webustany for GHOP 98).
---
 src/nikonmn.cpp |  2 +-
 src/tags.cpp    | 26 +++++++++++++++++++++++---
 src/tags.hpp    |  2 ++
 3 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/src/nikonmn.cpp b/src/nikonmn.cpp
index e9c843a..355645b 100644
--- a/src/nikonmn.cpp
+++ b/src/nikonmn.cpp
@@ -578,7 +578,7 @@ namespace Exiv2 {
     const TagInfo Nikon3MakerNote::tagInfo_[] = {
         TagInfo(0x0001, "Version", N_("Version"),
                 N_("Nikon Makernote version"),
-                nikon3IfdId, makerTags, undefined, printValue),
+                nikon3IfdId, makerTags, undefined, printVersion),
         TagInfo(0x0002, "ISOSpeed", N_("ISO Speed"),
                 N_("ISO speed setting"),
                 nikon3IfdId, makerTags, unsignedShort, print0x0002),
diff --git a/src/tags.cpp b/src/tags.cpp
index da2520f..498c754 100644
--- a/src/tags.cpp
+++ b/src/tags.cpp
@@ -721,7 +721,7 @@ namespace Exiv2 {
         TagInfo(0x9000, "ExifVersion", N_("Exif Version"),
                 N_("The version of this standard supported. Nonexistence of this "
                 "field is taken to mean nonconformance to the standard."),
-                exifIfdId, exifVersion, undefined, printValue),
+                exifIfdId, exifVersion, undefined, printVersion),
         TagInfo(0x9003, "DateTimeOriginal", N_("Date and Time (original)"),
                 N_("The date and time when the original image data was generated. "
                 "For a digital still camera the date and time the picture was taken are recorded."),
@@ -803,7 +803,7 @@ namespace Exiv2 {
                 exifIfdId, dateTime, asciiString, printValue),
         TagInfo(0xa000, "FlashpixVersion", N_("FlashPix Version"),
                 N_("The FlashPix format version supported by a FPXR file."),
-                exifIfdId, exifVersion, undefined, printValue),
+                exifIfdId, exifVersion, undefined, printVersion),
         TagInfo(0xa001, "ColorSpace", N_("Color Space"),
                 N_("The color space information tag is always "
                 "recorded as the color space specifier. Normally sRGB "
@@ -1161,7 +1161,7 @@ namespace Exiv2 {
                 iopIfdId, iopTags, asciiString, printValue),
         TagInfo(0x0002, "InteroperabilityVersion", N_("Interoperability Version"),
                 N_("Interoperability version"),
-                iopIfdId, iopTags, undefined, printValue),
+                iopIfdId, iopTags, undefined, printVersion),
         TagInfo(0x1000, "RelatedImageFileFormat", N_("Related Image File Format"),
                 N_("File format of image file"),
                 iopIfdId, iopTags, asciiString, printValue),
@@ -2002,6 +2002,26 @@ namespace Exiv2 {
         return os;
     }
 
+    std::ostream& printVersion(std::ostream& os, const Value& value)
+    {
+        if (value.size() != 4 || value.typeId() != undefined) {
+            return os << "(" << value << ")";
+        }
+
+        int i = 0;
+        /* Strip an eventual non significative digit */
+        if (value.toLong(0) == '0') {
+            i++;
+        }
+        for (; i < 4 ; ++i) {
+            os << static_cast<char>(value.toLong(i));
+            if (i == 1) {
+                os << '.';
+            }
+        }
+        return os;
+    }
+
     float fnumber(float apertureValue)
     {
         return static_cast<float>(std::exp(std::log(2.0) * apertureValue / 2));
diff --git a/src/tags.hpp b/src/tags.hpp
index 6b4ee06..cf2976b 100644
--- a/src/tags.hpp
+++ b/src/tags.hpp
@@ -475,6 +475,8 @@ namespace Exiv2 {
     std::ostream& print0xa404(std::ostream& os, const Value& value);
     //! Print 35mm equivalent focal length
     std::ostream& print0xa405(std::ostream& os, const Value& value);
+    //! Print any version packed in 4 Bytes format : major major minor minor
+    std::ostream& printVersion(std::ostream& os, const Value& value);
     //@}
 
     //! Calculate F number from an APEX aperture value

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list