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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:36:11 UTC 2017


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

The following commit has been merged in the master branch:
commit 7048f7d32b6bb756dc2e6916deaa62bafdbb02eb
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Fri Mar 19 10:07:09 2004 +0000

    Use Canon Makernote data for ISO and Exposure Program
---
 src/actions.cpp | 45 +++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 41 insertions(+), 4 deletions(-)

diff --git a/src/actions.cpp b/src/actions.cpp
index 6cd4b9d..a7983f7 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -20,13 +20,13 @@
  */
 /*
   File:      actions.cpp
-  Version:   $Name:  $ $Revision: 1.7 $
+  Version:   $Name:  $ $Revision: 1.8 $
   Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
   History:   08-Dec-03, ahu: created
  */
 // *****************************************************************************
 #include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.7 $ $RCSfile: actions.cpp,v $")
+EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.8 $ $RCSfile: actions.cpp,v $")
 
 // *****************************************************************************
 // included header files
@@ -188,8 +188,45 @@ namespace Action {
                       << "Aperture" << ": " << aperture.str() << "
";
         }
         printTag(exifData, "Image.CaptureConditions.Flash", "Flash");
-        printTag(exifData, "Image.CaptureConditions.ISOSpeedRatings", "ISO");
-        printTag(exifData, "Image.CaptureConditions.ExposureProgram", "Program");
+        // ISO speed, from ISOSpeedRatings or Canon Makernote
+        int rc = printTag(exifData, "Image.CaptureConditions.ISOSpeedRatings", "ISO");
+        if (rc == 0) {
+            md = exifData.findKey("Makernote.Canon.CameraSettings1");
+            if (md != exifData.end() && md->count() >= 16) {
+                long iso = md->toLong(16);
+                std::cout << std::setw(align_) << std::setfill(' ') << std::left
+                          << "ISO" << ": ";
+                switch (iso) {
+                case 15: std::cout << "Auto"; break;
+                case 16: std::cout << "50"; break;
+                case 17: std::cout << "100"; break;
+                case 18: std::cout << "200"; break;
+                case 19: std::cout << "400"; break;
+                default: std::cout << "(" << iso << ")"; break;
+                }
+                std::cout << "
";
+            }
+        }
+        // Exposure program from ExposureProgram or Canon Makernote
+        rc = printTag(exifData, "Image.CaptureConditions.ExposureProgram", "Exposure");
+        if (rc == 0) {
+            md = exifData.findKey("Makernote.Canon.CameraSettings1");
+            if (md != exifData.end() && md->count() >= 20) {
+                long prg = md->toLong(20);
+                std::cout << std::setw(align_) << std::setfill(' ') << std::left
+                          << "Exposure" << ": ";
+                switch (prg) {
+                case 0: std::cout << "Easy shooting"; break;
+                case 1: std::cout << "Program"; break;
+                case 2: std::cout << "Shutter priority"; break;
+                case 3: std::cout << "Aperture priority"; break;
+                case 4: std::cout << "Manual"; break;
+                case 5: std::cout << "A-DEP"; break;
+                default: std::cout << "(" << prg << ")"; break;
+                }
+                std::cout << "
";
+            }
+        }
         printTag(exifData, "Image.CaptureConditions.FocalLength", "Focal length");
         printTag(exifData, "Image.CaptureConditions.MeteringMode", "Metering mode");
 

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list