[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:35 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=8a3e708
The following commit has been merged in the master branch:
commit 8a3e708fd6c740e6e442fd28f99aae997ac1a8bb
Author: HumanDynamo <caulier.gilles at gmail.com>
Date: Thu Jun 18 08:53:15 2009 +0000
add PGF creation from scratch in memory
---
src/pgfimage.cpp | 29 +++++++++++++++++++++++++++--
src/pgfimage.hpp | 1 -
2 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/src/pgfimage.cpp b/src/pgfimage.cpp
index 9d32b3f..79e4709 100644
--- a/src/pgfimage.cpp
+++ b/src/pgfimage.cpp
@@ -57,13 +57,38 @@ EXIV2_RCSID("@(#) $Id: pgfimage.cpp 1750 2009-02-16 14:30:51Z ahuggel $")
// Signature from front of PGF file
const unsigned char pgfSignature[3] = { 0x50, 0x47, 0x46 };
+const unsigned char pgfBlank[] = { 0x50,0x47,0x46,0x36,0x10,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
+ 0x00,0x00,0x18,0x03,0x03,0x00,0x00,0x00,0x14,0x00,0x67,0x08,0x20,0x00,0xc0,0x01,
+ 0x00,0x00,0x37,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x37,0x00,
+ 0x00,0x78,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x37,0x00,0x00,0x78,0x00,0x00,
+ 0x00,0x00,0x01,0x00,0x00,0x00,0x37,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x01,0x00,
+ 0x00,0x00,0x37,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x37,0x00,
+ 0x00,0x78,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00
+ };
+
// *****************************************************************************
// class member definitions
namespace Exiv2 {
- PgfImage::PgfImage(BasicIo::AutoPtr io, bool /*create*/)
- : Image(ImageType::pgf, mdExif | mdIptc | mdComment, io)
+ PgfImage::PgfImage(BasicIo::AutoPtr io, bool create)
+ : Image(ImageType::pgf, mdExif | mdIptc| mdXmp | mdComment, io)
{
+ if (create)
+ {
+ if (io_->open() == 0)
+ {
+#ifdef DEBUG
+ std::cerr << "Exiv2::PgfImage:: Creating PGF image to memory
";
+#endif
+ IoCloser closer(*io_);
+ if (io_->write(pgfBlank, sizeof(pgfBlank)) != sizeof(pgfBlank))
+ {
+#ifdef DEBUG
+ std::cerr << "Exiv2::PgfImage:: Failed to create PGF image on memory
";
+#endif
+ }
+ }
+ }
} // PgfImage::PgfImage
void PgfImage::readMetadata()
diff --git a/src/pgfimage.hpp b/src/pgfimage.hpp
index 35a71c5..5c73a10 100644
--- a/src/pgfimage.hpp
+++ b/src/pgfimage.hpp
@@ -77,7 +77,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.
*/
PgfImage(BasicIo::AutoPtr io, bool create);
//@}
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list