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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:40:34 UTC 2017


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

The following commit has been merged in the master branch:
commit b625d025c82588f99e034aa36e0837cab0fdcf26
Author: HumanDynamo <caulier.gilles at gmail.com>
Date:   Thu Jun 18 06:14:53 2009 +0000

    wrong logic here to create blank PNG image in memory
---
 src/pngimage.cpp | 26 +++++++++++++++++---------
 src/pngimage.hpp |  1 -
 2 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/src/pngimage.cpp b/src/pngimage.cpp
index a58b21f..f9d8b42 100644
--- a/src/pngimage.cpp
+++ b/src/pngimage.cpp
@@ -31,7 +31,7 @@ EXIV2_RCSID("@(#) $Id$")
 
 // *****************************************************************************
 
-//#define DEBUG 1
+#define DEBUG 1
 
 // *****************************************************************************
 // included header files
@@ -60,12 +60,12 @@ EXIV2_RCSID("@(#) $Id$")
 const unsigned char pngSignature[8] = { 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A };
 
 const unsigned char pngBlank[] = { 0x50,0x89,0x47,0x4e,0x0a,0x0d,0x0a,0x1a,0x00,0x00,0x0d,0x00,0x48,0x49,0x52,0x44,
-                                              0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x02,0x08,0x00,0x00,0x90,0x00,0x53,0x77,
-                                              0x00,0xde,0x00,0x00,0x73,0x01,0x47,0x52,0x00,0x42,0xce,0xae,0xe9,0x1c,0x00,0x00,
-                                              0x09,0x00,0x48,0x70,0x73,0x59,0x00,0x00,0x13,0x0b,0x00,0x00,0x13,0x0b,0x00,0x01,
-                                              0x9c,0x9a,0x00,0x18,0x00,0x00,0x49,0x0c,0x41,0x44,0x08,0x54,0x63,0xd7,0xff,0xf8,
-                                              0x3f,0xff,0x05,0x00,0x02,0xfe,0xdc,0xfe,0x59,0xcc,0x00,0xe7,0x00,0x00,0x49,0x00,
-                                              0x4e,0x45,0xae,0x44,0x60,0x42,0x00,0x82 };
+                                   0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x02,0x08,0x00,0x00,0x90,0x00,0x53,0x77,
+                                   0x00,0xde,0x00,0x00,0x73,0x01,0x47,0x52,0x00,0x42,0xce,0xae,0xe9,0x1c,0x00,0x00,
+                                   0x09,0x00,0x48,0x70,0x73,0x59,0x00,0x00,0x13,0x0b,0x00,0x00,0x13,0x0b,0x00,0x01,
+                                   0x9c,0x9a,0x00,0x18,0x00,0x00,0x49,0x0c,0x41,0x44,0x08,0x54,0x63,0xd7,0xff,0xf8,
+                                   0x3f,0xff,0x05,0x00,0x02,0xfe,0xdc,0xfe,0x59,0xcc,0x00,0xe7,0x00,0x00,0x49,0x00,
+                                   0x4e,0x45,0xae,0x44,0x60,0x42,0x00,0x82 };
 
 // *****************************************************************************
 // class member definitions
@@ -78,10 +78,18 @@ namespace Exiv2 {
     {
         if (create)
         {
-            if (io_->open())
+            if (io_->open() == 0)
             {
+#ifdef DEBUG
+                std::cerr << "Exiv2::PngImage:: Creating PNG image to memory
";
+#endif
                 IoCloser closer(*io_);
-                io_->write(pngBlank, sizeof(pngBlank));
+                if (io_->write(pngBlank, sizeof(pngBlank)) != sizeof(pngBlank))
+                {
+#ifdef DEBUG
+                    std::cerr << "Exiv2::PngImage:: Failed to create PNG image on memory
";
+#endif
+                }
             }
         }
     } // PngImage::PngImage
diff --git a/src/pngimage.hpp b/src/pngimage.hpp
index 654643a..fa6253c 100644
--- a/src/pngimage.hpp
+++ b/src/pngimage.hpp
@@ -78,7 +78,6 @@ namespace Exiv2
               method to get a temporary reference.
           @param create Specifies if an existing image should be read (false)
               or if a new file should be created (true).
-              This option is not yet implemented.
          */
         PngImage(BasicIo::AutoPtr io, bool create);
         //@}

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list