[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:36:16 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=15fa808
The following commit has been merged in the master branch:
commit 15fa808e058dc1b0f775f9887b66b9ac0ea7b748
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Thu May 6 03:21:20 2004 +0000
Removed exiftest
---
src/Makefile | 6 +--
src/exiftest.cpp | 159 -------------------------------------------------------
2 files changed, 3 insertions(+), 162 deletions(-)
diff --git a/src/Makefile b/src/Makefile
index 0468c0d..6794209 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -20,7 +20,7 @@
# 02111-1307, USA.
#
# File: Makefile
-# Version: $Name: $ $Revision: 1.20 $
+# Version: $Name: $ $Revision: 1.21 $
# Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
# History: 10-Dec-03, ahu: created
#
@@ -55,8 +55,8 @@ CCSRC = canonmn.cpp exif.cpp fujimn.cpp ifd.cpp image.cpp makernote.cpp \
sigmamn.cpp tags.cpp types.cpp value.cpp
# Add source files of simple applications to this list
-BINSRC = addmoddel.cpp exifprint.cpp exiftest.cpp makernote-test.cpp \
- taglist.cpp write-test.cpp
+BINSRC = addmoddel.cpp exifprint.cpp makernote-test.cpp taglist.cpp \
+ write-test.cpp
# State the main source file of the Exiv2 application here
EXIV2MAIN = exiv2.cpp
diff --git a/src/exiftest.cpp b/src/exiftest.cpp
deleted file mode 100644
index a62629f..0000000
--- a/src/exiftest.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-// ***************************************************************** -*- C++ -*-
-/*
- Abstract : This is playground code, do what you want with it.
-
- Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
- Version : $Name: $ $Revision: 1.17 $
- */
-// *****************************************************************************
-#include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name: $ $Revision: 1.17 $ $RCSfile: exiftest.cpp,v $")
-
-// *****************************************************************************
-// included header files
-#include "exif.hpp"
-#include <iostream>
-#include <iomanip>
-#include <sstream>
-
-// *****************************************************************************
-// local declarations
-
-using namespace Exif;
-
-void exifPrint(const ExifData& exifData);
-std::string readError(int rc, const char* file);
-std::string writeError(int rc, const char* file);
-
-// *****************************************************************************
-// Main
-int main(int argc, char* const argv[])
-try {
-
- if (argc != 2) {
- std::cout << "Usage: exiftest file
";
- return 1;
- }
-
- ExifData exifData;
- int rc = exifData.read(argv[1]);
- if (rc) {
- std::string error = readError(rc, argv[1]);
- throw Error(error);
- }
-
- exifPrint(exifData);
- exifData.writeThumbnail("thumb");
-
- char* buf = new char[1024*128];
- long siz = exifData.copy(buf);
-
- std::cout << siz << " Bytes written.
"
- << "=======================
";
-
- ExifData e2;
- e2.read(buf, siz);
-
- exifPrint(e2);
- e2.writeThumbnail("t2");
-
- // Assumes that such a file exists...
- rc = e2.write("test.jpg");
- if (rc) {
- std::string error = writeError(rc, "test.jpg");
- throw Error(error);
- }
-
- return rc;
-}
-catch (Error& e) {
- std::cout << "Caught Exif exception '" << e << "'
";
- return 1;
-}
-
-// *****************************************************************************
-// local definitions
-
-void exifPrint(const ExifData& exifData)
-{
- ExifData::const_iterator beg = exifData.begin();
- ExifData::const_iterator end = exifData.end();
- ExifData::const_iterator i = beg;
- for (; i != end; ++i) {
- std::cout << "0x"
- << std::hex << std::setw(4) << std::setfill('0') << std::right
- << i->tag() << " "
- << std::setw(27) << std::setfill(' ') << std::left
- << i->tagName() << " "
- << std::setw(17) << std::setfill(' ') << std::left
- << i->typeName() << " "
- << std::dec << std::setw(3)
- << std::setfill(' ') << std::right
- << i->count() << " "
- << std::dec << *i
-// << std::dec << i->value()
-
-// << " | " << i->key()
- << " | " << i->ifdName()
-
- << "
";
- }
-}
-
-std::string readError(int rc, const char* file)
-{
- std::string error;
- switch (rc) {
- case -1:
- error = "Couldn't open file `" + std::string(file) + "'";
- break;
- case 1:
- error = "Couldn't read from the input stream";
- break;
- case 2:
- error = "This does not look like a JPEG image";
- break;
- case 3:
- error = "No Exif data found in the file";
- break;
- case -99:
- error = "Unsupported Exif or GPS data found in IFD 1";
- break;
- default:
- error = "Reading Exif data failed, rc = " + toString(rc);
- break;
- }
- return error;
-}
-
-std::string writeError(int rc, const char* file)
-{
- std::string error;
- switch (rc) {
- case -1:
- error = "Couldn't open file `" + std::string(file) + "'";
- break;
- case -2:
- error = "Couldn't open temporary file";
- break;
- case -3:
- error = "Renaming temporary file failed";
- break;
- case 1:
- error = "Couldn't read from the input stream";
- break;
- case 2:
- error = "This does not look like a JPEG image";
- break;
- case 3:
- error = "No JFIF APP0 or Exif APP1 segment found in the file";
- break;
- case 4:
- error = "Writing to the output stream failed";
- break;
- default:
- error = "Reading Exif data failed, rc = " + toString(rc);
- break;
- }
- return error;
-}
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list