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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:44:10 UTC 2017


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

The following commit has been merged in the master branch:
commit 3af9380bb2104c067899c4d45cb23aa7bad80471
Author: nkbj <nkbj1970 at hotmail.com>
Date:   Thu Apr 17 01:45:48 2014 +0000

    Issue #954: Add support for Exif.CanonFi.FocusDistanceUpper and Exif.CanonFi.FocusDistanceLower. Thanks goes to Roman Lebedev for the patch.
---
 src/actions.cpp     |  2 ++
 src/canonmn.cpp     | 25 +++++++++++++++++++++++++
 src/canonmn_int.hpp |  2 ++
 src/easyaccess.cpp  |  2 ++
 4 files changed, 31 insertions(+)

diff --git a/src/actions.cpp b/src/actions.cpp
index 7666398..29a940f 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -355,6 +355,8 @@ namespace Action {
         }
         if (!done) {
             done = 0 != printTag(exifData, "Exif.CanonSi.SubjectDistance");
+            done = 0 != printTag(exifData, "Exif.CanonSi.FocusDistanceLower");
+            done = 0 != printTag(exifData, "Exif.CanonSi.FocusDistanceUpper");
         }
         std::cout << std::endl;
 
diff --git a/src/canonmn.cpp b/src/canonmn.cpp
index c0b36fa..d30f404 100644
--- a/src/canonmn.cpp
+++ b/src/canonmn.cpp
@@ -1285,6 +1285,8 @@ namespace Exiv2 {
         TagInfo(0x000f, "ToningEffect", N_("Toning Effect"), N_("Toning Effect"), canonFiId, makerTags, signedShort, 1, EXV_PRINT_TAG(canonToningEffect)),
         TagInfo(0x0010, "MacroMagnification", N_("Macro Magnification"), N_("Macro magnification"), canonFiId, makerTags, signedShort, 1, printValue),
         TagInfo(0x0013, "LiveViewShooting", N_("Live View Shooting"), N_("Live view shooting"), canonFiId, makerTags, signedShort, 1, EXV_PRINT_TAG(canonOffOn)),
+        TagInfo(0x0014, "FocusDistanceUpper", N_("Focus Distance Upper"), N_("Focus Distance Upper"), canonFiId, makerTags, signedShort, 1, printFiFocusDistance),
+        TagInfo(0x0015, "FocusDistanceLower", N_("Focus Distance Lower"), N_("Focus Distance Lower"), canonFiId, makerTags, signedShort, 1, printFiFocusDistance),
         TagInfo(0x0019, "FlashExposureLock", N_("Flash Exposure Lock"), N_("Flash exposure lock"), canonFiId, makerTags, signedShort, 1, EXV_PRINT_TAG(canonOffOn)),
         // End of list marker
         TagInfo(0xffff, "(UnknownCanonFiTag)", "(UnknownCanonFiTag)", N_("Unknown Canon File Info tag"), canonFiId, makerTags, signedShort, 1, printValue)
@@ -1703,6 +1705,29 @@ namespace Exiv2 {
         return os;
     }
 
+    std::ostream& CanonMakerNote::printFiFocusDistance(std::ostream& os,
+                                                       const Value& value,
+                                                       const ExifData*)
+    {
+       if (   value.typeId() != signedShort
+         || value.count() == 0) return os << value;
+
+      std::ostringstream oss;
+      oss.copyfmt(os);
+      os << std::fixed << std::setprecision(2);
+
+      long l = value.toLong();
+      if (l == 0xffff) {
+        os << "Infinite";
+      }
+      else {
+        os << value.toLong()/100.0 << " m";
+      }
+
+      os.copyfmt(oss);
+      return os;
+    }
+
 // *****************************************************************************
 // free functions
 
diff --git a/src/canonmn_int.hpp b/src/canonmn_int.hpp
index 95f6d5d..e15e6e0 100644
--- a/src/canonmn_int.hpp
+++ b/src/canonmn_int.hpp
@@ -106,6 +106,8 @@ namespace Exiv2 {
         static std::ostream& printSi0x0016(std::ostream& os, const Value& value, const ExifData*);
         //! MeasuredEV2
         static std::ostream& printSi0x0017(std::ostream& os, const Value& value, const ExifData*);
+        //! Focus Distance
+        static std::ostream& printFiFocusDistance(std::ostream& os, const Value& value, const ExifData*);
         //@}
 
     private:
diff --git a/src/easyaccess.cpp b/src/easyaccess.cpp
index 69d3dc1..64c6236 100644
--- a/src/easyaccess.cpp
+++ b/src/easyaccess.cpp
@@ -414,6 +414,8 @@ namespace Exiv2 {
             "Exif.Photo.SubjectDistance",
             "Exif.Image.SubjectDistance",
             "Exif.CanonSi.SubjectDistance",
+            "Exif.CanonFi.FocusDistanceUpper",
+            "Exif.CanonFi.FocusDistanceLower",
             "Exif.MinoltaCsNew.FocusDistance",
             "Exif.Nikon1.FocusDistance",
             "Exif.Nikon3.FocusDistance",

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list