[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:12 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=13221f1
The following commit has been merged in the master branch:
commit 13221f14c89fa043c32ae8392c5607b470841dcf
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Tue Mar 23 03:18:35 2004 +0000
Simplified sample programs
---
src/Makefile | 6 +++---
src/{example1.cpp => addmoddel.cpp} | 41 +++----------------------------------
src/doxygen.hpp | 6 ++++--
src/exifprint.cpp | 41 +++++++------------------------------
4 files changed, 17 insertions(+), 77 deletions(-)
diff --git a/src/Makefile b/src/Makefile
index e3b8e39..6133742 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -20,7 +20,7 @@
# 02111-1307, USA.
#
# File: Makefile
-# Version: $Name: $ $Revision: 1.16 $
+# Version: $Name: $ $Revision: 1.17 $
# 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 \
tags.cpp types.cpp value.cpp
# Add source files of simple applications to this list
-BINSRC = example1.cpp taglist.cpp exifprint.cpp exiftest.cpp makernote-test.cpp \
- write-test.cpp
+BINSRC = addmoddel.cpp exifprint.cpp exiftest.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/example1.cpp b/src/addmoddel.cpp
similarity index 72%
rename from src/example1.cpp
rename to src/addmoddel.cpp
index 9e2ecf1..891d2dc 100644
--- a/src/example1.cpp
+++ b/src/addmoddel.cpp
@@ -1,9 +1,9 @@
// ***************************************************************** -*- C++ -*-
/*
- Abstract: Example showing how to add, modify and delete Exif metadata
+ Abstract: Sample program showing how to add, modify and delete Exif metadata.
- File: example1.cpp
- Version: $Name: $ $Revision: 1.5 $
+ File: addmoddel.cpp
+ Version: $Name: $ $Revision: 1.1 $
Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
History: 26-Jan-04, ahu: created
*/
@@ -14,12 +14,6 @@
#include <iomanip>
// *****************************************************************************
-// local declarations
-
-// Simple Exif data print function
-void exifPrint(const Exif::ExifData& exifData);
-
-// *****************************************************************************
// Main
int main()
try {
@@ -88,9 +82,6 @@ try {
std::cout << "Modified key \"" << key
<< "\", new value \"" << pos->value() << "\"
";
- std::cout << "---
";
- exifPrint(exifData);
-
// *************************************************************************
// Delete metadata from the Exif data container
@@ -99,10 +90,7 @@ try {
pos = exifData.findKey(key);
if (pos == exifData.end()) throw Exif::Error("Key not found");
exifData.erase(pos);
-
std::cout << "Deleted key \"" << key << "\"
";
- std::cout << "---
";
- exifPrint(exifData);
return 0;
}
@@ -110,26 +98,3 @@ catch (Exif::Error& e) {
std::cout << "Caught Exif exception '" << e << "'
";
return 1;
}
-
-// *****************************************************************************
-// local definitions
-
-void exifPrint(const Exif::ExifData& exifData)
-{
- Exif::ExifData::const_iterator beg = exifData.begin();
- Exif::ExifData::const_iterator end = exifData.end();
- Exif::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->value() << "
";
- }
-}
diff --git a/src/doxygen.hpp b/src/doxygen.hpp
index d140897..ad4e4ec 100644
--- a/src/doxygen.hpp
+++ b/src/doxygen.hpp
@@ -2,7 +2,7 @@
/*!
@file doxygen.hpp
@brief Additional documentation, this file contains no source code
- @version $Name: $ $Revision: 1.6 $
+ @version $Name: $ $Revision: 1.7 $
@author Andreas Huggel (ahu)
<a href="mailto:ahuggel at gmx.net">ahuggel at gmx.net</a>
@date 07-Feb-04, ahu: created
@@ -62,6 +62,8 @@
*/
/*!
- @example example1.cpp
+ @example addmoddel.cpp
Sample usage of high-level metadata operations.
+ @example exifprint.cpp
+ Sample program to print %Exif data from an image.
*/
diff --git a/src/exifprint.cpp b/src/exifprint.cpp
index ddd7775..ec0a370 100644
--- a/src/exifprint.cpp
+++ b/src/exifprint.cpp
@@ -1,40 +1,15 @@
// ***************************************************************** -*- C++ -*-
/*
- * Copyright (C) 2004 Andreas Huggel <ahuggel at gmx.net>
- *
- * This program is part of the Exiv2 distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-/*
Abstract : Sample program to print the Exif metadata of an image
File: exifprint.cpp
+ Version : $Name: $ $Revision: 1.11 $
Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
- Version : $Name: $ $Revision: 1.10 $
History : 26-Jan-04, ahu: created
*/
// *****************************************************************************
-#include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name: $ $Revision: 1.10 $ $RCSfile: exifprint.cpp,v $")
-
-// *****************************************************************************
// included header files
#include "exif.hpp"
-
-// + standard includes
#include <iostream>
#include <iomanip>
#include <cstring>
@@ -42,8 +17,6 @@ EXIV2_RCSID("@(#) $Name: $ $Revision: 1.10 $ $RCSfile: exifprint.cpp,v $")
// *****************************************************************************
// local declarations
-using namespace Exif;
-
std::string readError(int rc, const char* file);
// *****************************************************************************
@@ -56,15 +29,15 @@ try {
return 1;
}
- ExifData exifData;
+ Exif::ExifData exifData;
int rc = exifData.read(argv[1]);
if (rc) {
std::string error = readError(rc, argv[1]);
- throw Error(error);
+ throw Exif::Error(error);
}
- ExifData::const_iterator end = exifData.end();
- for (ExifData::const_iterator i = exifData.begin(); i != end; ++i) {
+ Exif::ExifData::const_iterator end = exifData.end();
+ for (Exif::ExifData::const_iterator i = exifData.begin(); i != end; ++i) {
std::cout << std::setw(53) << std::setfill(' ') << std::left
<< i->key() << " "
<< "0x" << std::setw(4) << std::setfill('0') << std::right
@@ -75,7 +48,7 @@ try {
return rc;
}
-catch (Error& e) {
+catch (Exif::Error& e) {
std::cout << "Caught Exif exception '" << e << "'
";
return -1;
}
@@ -103,7 +76,7 @@ std::string readError(int rc, const char* file)
error = "Unsupported Exif or GPS data found in IFD 1";
break;
default:
- error = "Reading Exif data failed, rc = " + toString(rc);
+ error = "Reading Exif data failed, rc = " + Exif::toString(rc);
break;
}
return error;
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list