[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:32 UTC 2017


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

The following commit has been merged in the master branch:
commit 528b2b11a1505248534c295c557864020dd7b165
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Thu Jun 5 10:47:40 2008 +0000

    Added a few more conversion tweaks, yet to be tested.
---
 src/convert.cpp | 45 +++++++++++++++++++++++----------------------
 src/tags.cpp    |  4 ++--
 2 files changed, 25 insertions(+), 24 deletions(-)

diff --git a/src/convert.cpp b/src/convert.cpp
index c8f0a52..406a98c 100644
--- a/src/convert.cpp
+++ b/src/convert.cpp
@@ -780,12 +780,10 @@ namespace Exiv2 {
         }
         XMP_DateTime datetime;
         SXMPUtils::ConvertToDate(value, &datetime);
-
         char buf[30];
-
         if (std::string(to) != "Exif.GPSInfo.GPSTimeStamp") {
 
-//          SXMPUtils::ConvertToLocalTime(&datetime);
+            SXMPUtils::ConvertToLocalTime(&datetime);
 
             sprintf(buf, "%4d:%02d:%02d %02d:%02d:%02d",
                     static_cast<int>(datetime.year),
@@ -796,30 +794,29 @@ namespace Exiv2 {
                     static_cast<int>(datetime.second));
             (*exifData_)[to] = buf;
 
-            const char *subsecTag = 0;
-            if (std::string(to) == "Exif.Image.DateTime") {
-                subsecTag = "Exif.Photo.SubSecTime";
-            }
-            else if (std::string(to) == "Exif.Photo.DateTimeOriginal") {
-                subsecTag = "Exif.Photo.SubSecTimeOriginal";
-            }
-            else if (std::string(to) == "Exif.Photo.DateTimeDigitized") {
-                subsecTag = "Exif.Photo.SubSecTimeDigitized";
-            }
-
-            if (subsecTag) {
-                prepareExifTarget(subsecTag, true);
-
-                if (datetime.nanoSecond) {
-                    sprintf(buf, "%09d", static_cast<int>(datetime.nanoSecond));
-                    (*exifData_)[subsecTag] = buf;
+            if (datetime.nanoSecond) {
+                const char* subsecTag = 0;
+                if (std::string(to) == "Exif.Image.DateTime") {
+                    subsecTag = "Exif.Photo.SubSecTime";
+                }
+                else if (std::string(to) == "Exif.Photo.DateTimeOriginal") {
+                    subsecTag = "Exif.Photo.SubSecTimeOriginal";
+                }
+                else if (std::string(to) == "Exif.Photo.DateTimeDigitized") {
+                    subsecTag = "Exif.Photo.SubSecTimeDigitized";
+                }
+                if (subsecTag) {
+                    prepareExifTarget(subsecTag, true);
+                    (*exifData_)[subsecTag] = toString(datetime.nanoSecond);
                 }
             }
         }
         else { // "Exif.GPSInfo.GPSTimeStamp"
             Rational rhour(datetime.hour, 1);
             Rational rmin(datetime.minute, 1);
-            Rational rsec = floatToRationalCast(static_cast<float>(datetime.second) + datetime.nanoSecond / 1000000000.0f);
+            Rational rsec = floatToRationalCast(
+                static_cast<float>(datetime.second + datetime.nanoSecond / 1000000000.0)
+            );
 
             std::ostringstream array;
             array << rhour << " " << rmin << " " << rsec;
@@ -834,7 +831,11 @@ namespace Exiv2 {
         }
 
         if (erase_) xmpData_->erase(pos);
-#endif
+#else
+# ifndef SUPPRESS_WARNINGS
+        std::cerr << "Warning: Failed to convert " << from << " to " << to << "
";
+# endif
+#endif // !EXV_HAVE_XMP_TOOLKIT
     }
 
     void Converter::cnvXmpVersion(const char* from, const char* to)
diff --git a/src/tags.cpp b/src/tags.cpp
index c49f509..9555160 100644
--- a/src/tags.cpp
+++ b/src/tags.cpp
@@ -2100,8 +2100,8 @@ namespace Exiv2 {
 
     std::ostream& printXmpDate(std::ostream& os, const Value& value)
     {
-        if (value.size() != 20 || value.typeId() != xmpText) {
-            return os << "(" << value << ")";
+        if (!(value.size() == 19 || value.size() == 20) || value.typeId() != xmpText) {
+            return os << value;
         }
 
 	std::string stringValue = value.toString();

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list