[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=b916c89

The following commit has been merged in the master branch:
commit b916c893200a82336cd97983bb9c91918c039956
Author: HumanDynamo <caulier.gilles at gmail.com>
Date:   Wed Jun 17 16:02:45 2009 +0000

    to be able to use blank image at init
---
 src/pngimage.cpp | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/pngimage.cpp b/src/pngimage.cpp
index cdb2b82..a58b21f 100644
--- a/src/pngimage.cpp
+++ b/src/pngimage.cpp
@@ -59,15 +59,31 @@ EXIV2_RCSID("@(#) $Id$")
 // Signature from front of PNG file
 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 };
+
 // *****************************************************************************
 // class member definitions
 namespace Exiv2 {
 
     using namespace Internal;
 
-    PngImage::PngImage(BasicIo::AutoPtr io, bool /*create*/)
+    PngImage::PngImage(BasicIo::AutoPtr io, bool create)
             : Image(ImageType::png, mdExif | mdIptc | mdComment, io)
     {
+        if (create)
+        {
+            if (io_->open())
+            {
+                IoCloser closer(*io_);
+                io_->write(pngBlank, sizeof(pngBlank));
+            }
+        }
     } // PngImage::PngImage
 
     void PngImage::readMetadata()

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list