Minor changes
This commit is contained in:
+3
-3
@@ -20,13 +20,13 @@
|
||||
*/
|
||||
/*
|
||||
File: actions.cpp
|
||||
Version: $Name: $ $Revision: 1.6 $
|
||||
Version: $Name: $ $Revision: 1.7 $
|
||||
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
History: 08-Dec-03, ahu: created
|
||||
*/
|
||||
// *****************************************************************************
|
||||
#include "rcsid.hpp"
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.6 $ $RCSfile: actions.cpp,v $")
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.7 $ $RCSfile: actions.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// included header files
|
||||
@@ -243,7 +243,7 @@ namespace Action {
|
||||
for (md = exifData.begin(); md != exifData.end(); ++md) {
|
||||
std::cout << "0x" << std::setw(4) << std::setfill('0') << std::right
|
||||
<< std::hex << md->tag() << " "
|
||||
<< std::setw(4) << std::setfill(' ') << std::left
|
||||
<< std::setw(9) << std::setfill(' ') << std::left
|
||||
<< md->ifdName() << " "
|
||||
<< std::setw(9) << std::setfill(' ') << std::left
|
||||
<< md->typeName() << " "
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
/*!
|
||||
@file doxygen.hpp
|
||||
@brief Additional documentation, this file contains no source code
|
||||
@version $Name: $ $Revision: 1.2 $
|
||||
@version $Name: $ $Revision: 1.3 $
|
||||
@author Andreas Huggel (ahu)
|
||||
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
|
||||
@date 07-Feb-04, ahu: created
|
||||
@@ -24,7 +24,7 @@
|
||||
Exiv2 is also a C++ %Exif metadata library, providing high-level access to the
|
||||
%Exif data of an image. Supported functionality includes
|
||||
- read %Exif information from JPEG files
|
||||
- access metadata through unique keys and standard C++ iterators
|
||||
- access metadata through keys and standard C++ iterators
|
||||
- add, modify and delete metadata
|
||||
- write %Exif data to JPEG files
|
||||
- extract %Exif metadata to files, insert from these files
|
||||
|
||||
+6
-5
@@ -3,7 +3,7 @@
|
||||
Abstract: Example showing how to add, modify and delete Exif metadata
|
||||
|
||||
File: example1.cpp
|
||||
Version: $Name: $ $Revision: 1.4 $
|
||||
Version: $Name: $ $Revision: 1.5 $
|
||||
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
History: 26-Jan-04, ahu: created
|
||||
*/
|
||||
@@ -67,6 +67,8 @@ try {
|
||||
std::string date = pos->toString();
|
||||
date.replace(0,4,"2000");
|
||||
pos->setValue(date);
|
||||
std::cout << "Modified key \"" << key
|
||||
<< "\", new value \"" << pos->value() << "\"\n";
|
||||
|
||||
// Find the other key
|
||||
key = "Image.ImageCharacteristics.PrimaryChromaticities";
|
||||
@@ -83,6 +85,8 @@ try {
|
||||
pos->setValue(rv);
|
||||
// Delete the memory allocated by getValue
|
||||
delete v;
|
||||
std::cout << "Modified key \"" << key
|
||||
<< "\", new value \"" << pos->value() << "\"\n";
|
||||
|
||||
std::cout << "---\n";
|
||||
exifPrint(exifData);
|
||||
@@ -90,16 +94,13 @@ try {
|
||||
// *************************************************************************
|
||||
// Delete metadata from the Exif data container
|
||||
|
||||
// Delete a metadatum by its key
|
||||
key = "Image.DateTime.DateTimeOriginal";
|
||||
exifData.erase(key);
|
||||
|
||||
// Delete the metadatum at iterator position pos
|
||||
key = "Image.ImageCharacteristics.PrimaryChromaticities";
|
||||
pos = exifData.findKey(key);
|
||||
if (pos == exifData.end()) throw Exif::Error("Key not found");
|
||||
exifData.erase(pos);
|
||||
|
||||
std::cout << "Deleted key \"" << key << "\"\n";
|
||||
std::cout << "---\n";
|
||||
exifPrint(exifData);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user