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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:46:20 UTC 2017


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

The following commit has been merged in the master branch:
commit 8369592af12ad318177343055179690c4b3feced
Author: Robin Mills <robin at clanmills.com>
Date:   Thu Mar 17 22:36:23 2016 +0000

    #1074.  Thanks to Max for reporting this and providing the test file.
---
 src/pngimage.cpp | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/pngimage.cpp b/src/pngimage.cpp
index 6b59645..74caee1 100644
--- a/src/pngimage.cpp
+++ b/src/pngimage.cpp
@@ -166,6 +166,18 @@ namespace Exiv2 {
         return result;
     }
 
+    std::string upper(const std::string& str)
+    {
+        std::string result;
+        transform(str.begin(), str.end(), std::back_inserter(result), toupper);
+        return result;
+    }
+
+    std::string::size_type findi(const std::string& str, const std::string& substr)
+    {
+        return upper(str).find(upper(substr) );
+    }
+
     void PngImage::printStructure(std::ostream& out, PrintStructureOption option, int depth)
     {
         if (io_->open() != 0) {
@@ -243,11 +255,11 @@ namespace Exiv2 {
                 bool iTXt  = std::strcmp(chType,"iTXt")== 0;
 
                 // for XMP, ICC etc: read and format data
-                bool bXMP  = option == kpsXMP        && dataString.find(xmpKey)==0;
-                bool bICC  = option == kpsIccProfile && dataString.find(iccKey)==0;
-                bool bExif = option == kpsRecursive  && dataString.find(exifKey)==0;
-                bool bIptc = option == kpsRecursive  && dataString.find(iptcKey)==0;
-                bool bSoft = option == kpsRecursive  && dataString.find(softKey)==0;
+                bool bXMP  = option == kpsXMP        && findi(dataString,xmpKey)==0;
+                bool bICC  = option == kpsIccProfile && findi(dataString,iccKey)==0;
+                bool bExif = option == kpsRecursive  && findi(dataString,exifKey)==0;
+                bool bIptc = option == kpsRecursive  && findi(dataString,iptcKey)==0;
+                bool bSoft = option == kpsRecursive  && findi(dataString,softKey)==0;
                 bool bDump = bXMP || bICC || bExif || bIptc || bSoft ;
 
                 if( bDump ) {

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list