Changed namespace name Exif to Exiv2
This commit is contained in:
+44
-44
@@ -20,13 +20,13 @@
|
||||
*/
|
||||
/*
|
||||
File: actions.cpp
|
||||
Version: $Name: $ $Revision: 1.20 $
|
||||
Version: $Name: $ $Revision: 1.21 $
|
||||
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
History: 08-Dec-03, ahu: created
|
||||
*/
|
||||
// *****************************************************************************
|
||||
#include "rcsid.hpp"
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.20 $ $RCSfile: actions.cpp,v $")
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.21 $ $RCSfile: actions.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// included header files
|
||||
@@ -65,10 +65,10 @@ namespace {
|
||||
// Convert a time type to a string "YYYY:MM:DD HH:MI:SS", "" on error
|
||||
std::string time2Str(time_t time);
|
||||
|
||||
// Return an error message for the return code of Exif::ExifData::read
|
||||
// Return an error message for the return code of Exiv2::ExifData::read
|
||||
std::string exifReadError(int rc, const std::string& path);
|
||||
|
||||
// Return an error message for the return code of Exif::ExifData::write
|
||||
// Return an error message for the return code of Exiv2::ExifData::write
|
||||
std::string exifWriteError(int rc, const std::string& path);
|
||||
|
||||
}
|
||||
@@ -125,7 +125,7 @@ namespace Action {
|
||||
int Print::run(const std::string& path)
|
||||
try {
|
||||
path_ = path;
|
||||
Exif::ExifData exifData;
|
||||
Exiv2::ExifData exifData;
|
||||
int rc = exifData.read(path);
|
||||
if (rc) {
|
||||
std::cerr << exifReadError(rc, path) << "\n";
|
||||
@@ -139,14 +139,14 @@ namespace Action {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
catch(const Exif::Error& e)
|
||||
catch(const Exiv2::Error& e)
|
||||
{
|
||||
std::cerr << "Exif exception in print action for file "
|
||||
<< path << ":\n" << e << "\n";
|
||||
return 1;
|
||||
} // Print::run
|
||||
|
||||
void Print::printSummary(const Exif::ExifData& exifData)
|
||||
void Print::printSummary(const Exiv2::ExifData& exifData)
|
||||
{
|
||||
align_ = 16;
|
||||
|
||||
@@ -178,7 +178,7 @@ namespace Action {
|
||||
// From ExposureTime, failing that, try ShutterSpeedValue
|
||||
std::cout << std::setw(align_) << std::setfill(' ') << std::left
|
||||
<< "Exposure time" << ": ";
|
||||
Exif::ExifData::const_iterator md;
|
||||
Exiv2::ExifData::const_iterator md;
|
||||
if (0 == printTag(exifData, "Image.CaptureConditions.ExposureTime")) {
|
||||
md = exifData.findKey("Image.CaptureConditions.ShutterSpeedValue");
|
||||
if (md != exifData.end()) {
|
||||
@@ -218,7 +218,7 @@ namespace Action {
|
||||
<< "Flash bias" << ": ";
|
||||
md = exifData.findKey("Makernote.Canon.CameraSettings2");
|
||||
if (md != exifData.end() && md->count() >= 15) {
|
||||
Exif::CanonMakerNote::print0x0004_15(std::cout, md->toLong(15));
|
||||
Exiv2::CanonMakerNote::print0x0004_15(std::cout, md->toLong(15));
|
||||
}
|
||||
std::cout << "\n";
|
||||
|
||||
@@ -240,7 +240,7 @@ namespace Action {
|
||||
if (0 == printTag(exifData, "Image.CaptureConditions.SubjectDistance")) {
|
||||
md = exifData.findKey("Makernote.Canon.CameraSettings2");
|
||||
if (md != exifData.end() && md->count() >= 19) {
|
||||
Exif::CanonMakerNote::print0x0004_19(std::cout, md->toLong(19));
|
||||
Exiv2::CanonMakerNote::print0x0004_19(std::cout, md->toLong(19));
|
||||
}
|
||||
}
|
||||
std::cout << "\n";
|
||||
@@ -252,7 +252,7 @@ namespace Action {
|
||||
if (0 == printTag(exifData, "Image.CaptureConditions.ISOSpeedRatings")) {
|
||||
md = exifData.findKey("Makernote.Canon.CameraSettings1");
|
||||
if (md != exifData.end() && md->count() >= 16) {
|
||||
Exif::CanonMakerNote::print0x0001_16(std::cout, md->toLong(16));
|
||||
Exiv2::CanonMakerNote::print0x0001_16(std::cout, md->toLong(16));
|
||||
}
|
||||
}
|
||||
std::cout << "\n";
|
||||
@@ -264,7 +264,7 @@ namespace Action {
|
||||
if (0 == printTag(exifData, "Image.CaptureConditions.ExposureProgram")) {
|
||||
md = exifData.findKey("Makernote.Canon.CameraSettings1");
|
||||
if (md != exifData.end() && md->count() >= 20) {
|
||||
Exif::CanonMakerNote::print0x0001_20(std::cout, md->toLong(20));
|
||||
Exiv2::CanonMakerNote::print0x0001_20(std::cout, md->toLong(20));
|
||||
}
|
||||
}
|
||||
std::cout << "\n";
|
||||
@@ -279,7 +279,7 @@ namespace Action {
|
||||
bool done = false;
|
||||
md = exifData.findKey("Makernote.Canon.CameraSettings1");
|
||||
if (md != exifData.end() && md->count() >= 1) {
|
||||
Exif::CanonMakerNote::print0x0001_01(std::cout, md->toLong(1));
|
||||
Exiv2::CanonMakerNote::print0x0001_01(std::cout, md->toLong(1));
|
||||
done = true;
|
||||
}
|
||||
if (!done) {
|
||||
@@ -294,7 +294,7 @@ namespace Action {
|
||||
done = false;
|
||||
md = exifData.findKey("Makernote.Canon.CameraSettings1");
|
||||
if (md != exifData.end() && md->count() >= 3) {
|
||||
Exif::CanonMakerNote::print0x0001_03(std::cout, md->toLong(3));
|
||||
Exiv2::CanonMakerNote::print0x0001_03(std::cout, md->toLong(3));
|
||||
done = true;
|
||||
}
|
||||
if (!done) {
|
||||
@@ -326,7 +326,7 @@ namespace Action {
|
||||
done = false;
|
||||
md = exifData.findKey("Makernote.Canon.CameraSettings2");
|
||||
if (md != exifData.end() && md->count() >= 7) {
|
||||
Exif::CanonMakerNote::print0x0004_07(std::cout, md->toLong(7));
|
||||
Exiv2::CanonMakerNote::print0x0004_07(std::cout, md->toLong(7));
|
||||
done = true;
|
||||
}
|
||||
if (!done) {
|
||||
@@ -359,7 +359,7 @@ namespace Action {
|
||||
|
||||
} // Print::printSummary
|
||||
|
||||
int Print::printTag(const Exif::ExifData& exifData,
|
||||
int Print::printTag(const Exiv2::ExifData& exifData,
|
||||
const std::string& key,
|
||||
const std::string& label) const
|
||||
{
|
||||
@@ -369,7 +369,7 @@ namespace Action {
|
||||
std::cout << std::setw(align_) << std::setfill(' ') << std::left
|
||||
<< label << ": ";
|
||||
}
|
||||
Exif::ExifData::const_iterator md = exifData.findKey(key);
|
||||
Exiv2::ExifData::const_iterator md = exifData.findKey(key);
|
||||
if (md != exifData.end()) {
|
||||
std::cout << *md;
|
||||
rc = 1;
|
||||
@@ -378,9 +378,9 @@ namespace Action {
|
||||
return rc;
|
||||
} // Print::printTag
|
||||
|
||||
void Print::printInterpreted(const Exif::ExifData& exifData)
|
||||
void Print::printInterpreted(const Exiv2::ExifData& exifData)
|
||||
{
|
||||
Exif::ExifData::const_iterator md;
|
||||
Exiv2::ExifData::const_iterator md;
|
||||
for (md = exifData.begin(); md != exifData.end(); ++md) {
|
||||
std::cout << "0x" << std::setw(4) << std::setfill('0') << std::right
|
||||
<< std::hex << md->tag() << " "
|
||||
@@ -392,9 +392,9 @@ namespace Action {
|
||||
}
|
||||
} // Print::printInterpreted
|
||||
|
||||
void Print::printValues(const Exif::ExifData& exifData)
|
||||
void Print::printValues(const Exiv2::ExifData& exifData)
|
||||
{
|
||||
Exif::ExifData::const_iterator md;
|
||||
Exiv2::ExifData::const_iterator md;
|
||||
for (md = exifData.begin(); md != exifData.end(); ++md) {
|
||||
std::cout << "0x" << std::setw(4) << std::setfill('0') << std::right
|
||||
<< std::hex << md->tag() << " "
|
||||
@@ -412,9 +412,9 @@ namespace Action {
|
||||
}
|
||||
} // Print::printValues
|
||||
|
||||
void Print::printHexdump(const Exif::ExifData& exifData)
|
||||
void Print::printHexdump(const Exiv2::ExifData& exifData)
|
||||
{
|
||||
Exif::ExifData::const_iterator md;
|
||||
Exiv2::ExifData::const_iterator md;
|
||||
for (md = exifData.begin(); md != exifData.end(); ++md) {
|
||||
std::cout << std::setw(4) << std::setfill(' ') << std::left
|
||||
<< md->ifdName() << " "
|
||||
@@ -430,9 +430,9 @@ namespace Action {
|
||||
<< md->size() << " "
|
||||
<< std::setw(27) << std::setfill(' ') << std::left
|
||||
<< md->tagName() << "\n";
|
||||
Exif::DataBuf buf(md->size());
|
||||
Exiv2::DataBuf buf(md->size());
|
||||
md->copy(buf.pData_, exifData.byteOrder());
|
||||
Exif::hexdump(std::cout, buf.pData_, buf.size_);
|
||||
Exiv2::hexdump(std::cout, buf.pData_, buf.size_);
|
||||
}
|
||||
} // Print::printHexdump
|
||||
|
||||
@@ -448,14 +448,14 @@ namespace Action {
|
||||
|
||||
int Rename::run(const std::string& path)
|
||||
try {
|
||||
Exif::ExifData exifData;
|
||||
Exiv2::ExifData exifData;
|
||||
int rc = exifData.read(path);
|
||||
if (rc) {
|
||||
std::cerr << exifReadError(rc, path) << "\n";
|
||||
return rc;
|
||||
}
|
||||
std::string key = "Image.DateTime.DateTimeOriginal";
|
||||
Exif::ExifData::iterator md = exifData.findKey(key);
|
||||
Exiv2::ExifData::iterator md = exifData.findKey(key);
|
||||
if (md == exifData.end()) {
|
||||
std::cerr << "Metadatum with key `" << key << "' "
|
||||
<< "not found in the file " << path << "\n";
|
||||
@@ -512,7 +512,7 @@ namespace Action {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
catch(const Exif::Error& e)
|
||||
catch(const Exiv2::Error& e)
|
||||
{
|
||||
std::cerr << "Exif exception in rename action for file " << path
|
||||
<< ":\n" << e << "\n";
|
||||
@@ -532,7 +532,7 @@ namespace Action {
|
||||
int Erase::run(const std::string& path)
|
||||
try {
|
||||
path_ = path;
|
||||
Exif::ExifData exifData;
|
||||
Exiv2::ExifData exifData;
|
||||
int rc = exifData.read(path);
|
||||
if (rc) {
|
||||
std::cerr << exifReadError(rc, path) << "\n";
|
||||
@@ -544,14 +544,14 @@ namespace Action {
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
catch(const Exif::Error& e)
|
||||
catch(const Exiv2::Error& e)
|
||||
{
|
||||
std::cerr << "Exif exception in erase action for file " << path
|
||||
<< ":\n" << e << "\n";
|
||||
return 1;
|
||||
} // Erase::run
|
||||
|
||||
int Erase::eraseThumbnail(Exif::ExifData& exifData) const
|
||||
int Erase::eraseThumbnail(Exiv2::ExifData& exifData) const
|
||||
{
|
||||
int rc = 0;
|
||||
std::string thumbExt = exifData.thumbnailExtension();
|
||||
@@ -573,7 +573,7 @@ namespace Action {
|
||||
return rc;
|
||||
}
|
||||
|
||||
int Erase::eraseExifData(Exif::ExifData& exifData) const
|
||||
int Erase::eraseExifData(Exiv2::ExifData& exifData) const
|
||||
{
|
||||
if (Params::instance().verbose_) {
|
||||
std::cout << "Erasing Exif data from the file\n";
|
||||
@@ -598,7 +598,7 @@ namespace Action {
|
||||
int Extract::run(const std::string& path)
|
||||
try {
|
||||
path_ = path;
|
||||
Exif::ExifData exifData;
|
||||
Exiv2::ExifData exifData;
|
||||
int rc = exifData.read(path);
|
||||
if (rc) {
|
||||
std::cerr << exifReadError(rc, path) << "\n";
|
||||
@@ -610,14 +610,14 @@ namespace Action {
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
catch(const Exif::Error& e)
|
||||
catch(const Exiv2::Error& e)
|
||||
{
|
||||
std::cerr << "Exif exception in extract action for file " << path
|
||||
<< ":\n" << e << "\n";
|
||||
return 1;
|
||||
} // Extract::run
|
||||
|
||||
int Extract::writeExifData(Exif::ExifData& exifData) const
|
||||
int Extract::writeExifData(Exiv2::ExifData& exifData) const
|
||||
{
|
||||
std::string exvPath = Util::dirname(path_) + "/"
|
||||
+ Util::basename(path_, true) + ".exv";
|
||||
@@ -638,7 +638,7 @@ namespace Action {
|
||||
return rc;
|
||||
}
|
||||
|
||||
int Extract::writeThumbnail(const Exif::ExifData& exifData) const
|
||||
int Extract::writeThumbnail(const Exiv2::ExifData& exifData) const
|
||||
{
|
||||
std::string thumb = Util::dirname(path_) + "/"
|
||||
+ Util::basename(path_, true) + "-thumb";
|
||||
@@ -685,7 +685,7 @@ namespace Action {
|
||||
try {
|
||||
std::string exvPath = Util::dirname(path) + "/"
|
||||
+ Util::basename(path, true) + ".exv";
|
||||
Exif::ExifData exifData;
|
||||
Exiv2::ExifData exifData;
|
||||
int rc = exifData.read(exvPath);
|
||||
if (rc) {
|
||||
std::cerr << exifReadError(rc, exvPath) << "\n";
|
||||
@@ -700,7 +700,7 @@ namespace Action {
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
catch(const Exif::Error& e)
|
||||
catch(const Exiv2::Error& e)
|
||||
{
|
||||
std::cerr << "Exif exception in insert action for file " << path
|
||||
<< ":\n" << e << "\n";
|
||||
@@ -721,7 +721,7 @@ namespace Action {
|
||||
try {
|
||||
adjustment_ = Params::instance().adjustment_;
|
||||
|
||||
Exif::ExifData exifData;
|
||||
Exiv2::ExifData exifData;
|
||||
int rc = exifData.read(path);
|
||||
if (rc) {
|
||||
std::cerr << exifReadError(rc, path) << "\n";
|
||||
@@ -737,7 +737,7 @@ namespace Action {
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
catch(const Exif::Error& e)
|
||||
catch(const Exiv2::Error& e)
|
||||
{
|
||||
std::cerr << "Exif exception in adjust action for file " << path
|
||||
<< ":\n" << e << "\n";
|
||||
@@ -754,11 +754,11 @@ namespace Action {
|
||||
return new Adjust(*this);
|
||||
}
|
||||
|
||||
int Adjust::adjustDateTime(Exif::ExifData& exifData,
|
||||
int Adjust::adjustDateTime(Exiv2::ExifData& exifData,
|
||||
const std::string& key,
|
||||
const std::string& path) const
|
||||
{
|
||||
Exif::ExifData::iterator md = exifData.findKey(key);
|
||||
Exiv2::ExifData::iterator md = exifData.findKey(key);
|
||||
if (md == exifData.end()) {
|
||||
// Key not found. That's ok, we do nothing.
|
||||
return 0;
|
||||
@@ -868,7 +868,7 @@ namespace {
|
||||
error = path + ": Unsupported Exif or GPS data found in IFD 1";
|
||||
break;
|
||||
default:
|
||||
error = path + ": Reading Exif data failed, rc = " + Exif::toString(rc);
|
||||
error = path + ": Reading Exif data failed, rc = " + Exiv2::toString(rc);
|
||||
break;
|
||||
}
|
||||
return error;
|
||||
@@ -903,7 +903,7 @@ namespace {
|
||||
error = path + ": Writing to the output stream failed";
|
||||
break;
|
||||
default:
|
||||
error = path + ": Reading Exif data failed, rc = " + Exif::toString(rc);
|
||||
error = path + ": Reading Exif data failed, rc = " + Exiv2::toString(rc);
|
||||
break;
|
||||
}
|
||||
return error;
|
||||
|
||||
+12
-12
@@ -22,7 +22,7 @@
|
||||
@file actions.hpp
|
||||
@brief Implements base class Task, TaskFactory and the various supported
|
||||
actions (derived from Task).
|
||||
@version $Name: $ $Revision: 1.7 $
|
||||
@version $Name: $ $Revision: 1.8 $
|
||||
@author Andreas Huggel (ahu)
|
||||
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
|
||||
@date 11-Dec-03, ahu: created
|
||||
@@ -40,7 +40,7 @@
|
||||
// *****************************************************************************
|
||||
// class declarations
|
||||
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
class ExifData;
|
||||
}
|
||||
|
||||
@@ -150,19 +150,19 @@ namespace Action {
|
||||
AutoPtr clone() const;
|
||||
|
||||
//! Print %Exif summary information
|
||||
void printSummary(const Exif::ExifData& exifData);
|
||||
void printSummary(const Exiv2::ExifData& exifData);
|
||||
//! Print the interpreted value for each %Exif tag
|
||||
void printInterpreted(const Exif::ExifData& exifData);
|
||||
void printInterpreted(const Exiv2::ExifData& exifData);
|
||||
//! Print uninterpreted %Exif information
|
||||
void printValues(const Exif::ExifData& exifData);
|
||||
void printValues(const Exiv2::ExifData& exifData);
|
||||
//! Print %Exif information in hexdump format
|
||||
void printHexdump(const Exif::ExifData& exifData);
|
||||
void printHexdump(const Exiv2::ExifData& exifData);
|
||||
/*!
|
||||
@brief Print one summary line with a label (if provided) and requested
|
||||
data. A line break is printed only if a label is provided.
|
||||
@return 1 if a line was written, 0 if the key was not found.
|
||||
*/
|
||||
int printTag(const Exif::ExifData& exifData,
|
||||
int printTag(const Exiv2::ExifData& exifData,
|
||||
const std::string& key,
|
||||
const std::string& label ="") const;
|
||||
|
||||
@@ -198,7 +198,7 @@ namespace Action {
|
||||
|
||||
private:
|
||||
virtual Task* clone_() const;
|
||||
int adjustDateTime(Exif::ExifData& exifData,
|
||||
int adjustDateTime(Exiv2::ExifData& exifData,
|
||||
const std::string& key,
|
||||
const std::string& path) const;
|
||||
|
||||
@@ -218,11 +218,11 @@ namespace Action {
|
||||
/*!
|
||||
@brief Delete the thumbnail image, incl IFD1 metadata from the file.
|
||||
*/
|
||||
int eraseThumbnail(Exif::ExifData& exifData) const;
|
||||
int eraseThumbnail(Exiv2::ExifData& exifData) const;
|
||||
/*!
|
||||
@brief Erase the complete %Exif data block from the file.
|
||||
*/
|
||||
int eraseExifData(Exif::ExifData& exifData) const;
|
||||
int eraseExifData(Exiv2::ExifData& exifData) const;
|
||||
|
||||
private:
|
||||
virtual Task* clone_() const;
|
||||
@@ -246,12 +246,12 @@ namespace Action {
|
||||
"-thumb" and the appropriate suffix (".jpg" or ".tif"), depending
|
||||
on the format of the %Exif thumbnail image.
|
||||
*/
|
||||
int writeThumbnail(const Exif::ExifData& exifData) const;
|
||||
int writeThumbnail(const Exiv2::ExifData& exifData) const;
|
||||
/*!
|
||||
@brief Write the %Exif data to a file. The filename is composed by
|
||||
replacing the suffix of the image filename with ".exf".
|
||||
*/
|
||||
int writeExifData(Exif::ExifData& exifData) const;
|
||||
int writeExifData(Exiv2::ExifData& exifData) const;
|
||||
|
||||
private:
|
||||
virtual Task* clone_() const;
|
||||
|
||||
+11
-11
@@ -3,7 +3,7 @@
|
||||
Abstract: Sample program showing how to add, modify and delete Exif metadata.
|
||||
|
||||
File: addmoddel.cpp
|
||||
Version: $Name: $ $Revision: 1.1 $
|
||||
Version: $Name: $ $Revision: 1.2 $
|
||||
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
History: 26-Jan-04, ahu: created
|
||||
*/
|
||||
@@ -18,13 +18,13 @@
|
||||
int main()
|
||||
try {
|
||||
// Container for all metadata
|
||||
Exif::ExifData exifData;
|
||||
Exiv2::ExifData exifData;
|
||||
|
||||
// *************************************************************************
|
||||
// Add to the Exif data
|
||||
|
||||
// Create a value of the required type
|
||||
Exif::Value* v = Exif::Value::create(Exif::asciiString);
|
||||
Exiv2::Value* v = Exiv2::Value::create(Exiv2::asciiString);
|
||||
// Set the value to a string
|
||||
v->read("1999:12:31 23:59:59");
|
||||
// Add the value together with its key to the Exif data container
|
||||
@@ -36,7 +36,7 @@ try {
|
||||
delete v;
|
||||
|
||||
// Now create a more interesting value
|
||||
Exif::URationalValue* rv = new Exif::URationalValue;
|
||||
Exiv2::URationalValue* rv = new Exiv2::URationalValue;
|
||||
// Set two rational components from a string
|
||||
rv->read("1/2 1/3");
|
||||
// Add more elements through the extended interface of rational value
|
||||
@@ -55,8 +55,8 @@ try {
|
||||
|
||||
// Find the timestamp metadatum by its key
|
||||
key = "Image.DateTime.DateTimeOriginal";
|
||||
Exif::ExifData::iterator pos = exifData.findKey(key);
|
||||
if (pos == exifData.end()) throw Exif::Error("Key not found");
|
||||
Exiv2::ExifData::iterator pos = exifData.findKey(key);
|
||||
if (pos == exifData.end()) throw Exiv2::Error("Key not found");
|
||||
// Modify the value
|
||||
std::string date = pos->toString();
|
||||
date.replace(0,4,"2000");
|
||||
@@ -67,12 +67,12 @@ try {
|
||||
// Find the other key
|
||||
key = "Image.ImageCharacteristics.PrimaryChromaticities";
|
||||
pos = exifData.findKey(key);
|
||||
if (pos == exifData.end()) throw Exif::Error("Key not found");
|
||||
if (pos == exifData.end()) throw Exiv2::Error("Key not found");
|
||||
// Get a pointer to a copy of the value
|
||||
v = pos->getValue();
|
||||
// Downcast the Value pointer to its actual type
|
||||
rv = dynamic_cast<Exif::URationalValue*>(v);
|
||||
if (rv == 0) throw Exif::Error("Downcast failed");
|
||||
rv = dynamic_cast<Exiv2::URationalValue*>(v);
|
||||
if (rv == 0) throw Exiv2::Error("Downcast failed");
|
||||
// Modify elements through the extended interface of the actual type
|
||||
rv->value_[2] = std::make_pair(88,77);
|
||||
// Copy the modified value back to the metadatum
|
||||
@@ -88,13 +88,13 @@ try {
|
||||
// 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");
|
||||
if (pos == exifData.end()) throw Exiv2::Error("Key not found");
|
||||
exifData.erase(pos);
|
||||
std::cout << "Deleted key \"" << key << "\"\n";
|
||||
|
||||
return 0;
|
||||
}
|
||||
catch (Exif::Error& e) {
|
||||
catch (Exiv2::Error& e) {
|
||||
std::cout << "Caught Exif exception '" << e << "'\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
+4
-4
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
/*
|
||||
File: canonmn.cpp
|
||||
Version: $Name: $ $Revision: 1.6 $
|
||||
Version: $Name: $ $Revision: 1.7 $
|
||||
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
History: 18-Feb-04, ahu: created
|
||||
07-Mar-04, ahu: isolated as a separate component
|
||||
@@ -30,7 +30,7 @@
|
||||
*/
|
||||
// *****************************************************************************
|
||||
#include "rcsid.hpp"
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.6 $ $RCSfile: canonmn.cpp,v $")
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.7 $ $RCSfile: canonmn.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// included header files
|
||||
@@ -49,7 +49,7 @@ EXIV2_RCSID("@(#) $Name: $ $Revision: 1.6 $ $RCSfile: canonmn.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// class member definitions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
const CanonMakerNote::RegisterMakerNote CanonMakerNote::register_;
|
||||
|
||||
@@ -663,4 +663,4 @@ namespace Exif {
|
||||
return new CanonMakerNote(alloc);
|
||||
}
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
+3
-3
@@ -23,7 +23,7 @@
|
||||
@brief Canon MakerNote implemented according to the specification
|
||||
"EXIF MakerNote of Canon" <http://www.burren.cx/david/canon.html>
|
||||
by David Burren
|
||||
@version $Name: $ $Revision: 1.4 $
|
||||
@version $Name: $ $Revision: 1.5 $
|
||||
@author Andreas Huggel (ahu)
|
||||
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
|
||||
@date 18-Feb-04, ahu: created
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
// *****************************************************************************
|
||||
// namespace extensions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
// *****************************************************************************
|
||||
// class declarations
|
||||
@@ -186,6 +186,6 @@ namespace Exif {
|
||||
|
||||
}; // class CanonMakerNote
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
#endif // #ifndef CANONMN_HPP_
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@
|
||||
/*!
|
||||
@file error.hpp
|
||||
@brief Error class for exceptions
|
||||
@version $Name: $ $Revision: 1.1 $
|
||||
@version $Name: $ $Revision: 1.2 $
|
||||
@author Andreas Huggel (ahu)
|
||||
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
|
||||
@date 15-Jan-04, ahu: created
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
// *****************************************************************************
|
||||
// namespace extensions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
// *****************************************************************************
|
||||
// class definitions
|
||||
@@ -68,6 +68,6 @@ namespace Exif {
|
||||
return os << error.message();
|
||||
}
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
#endif // #ifndef ERROR_HPP_
|
||||
|
||||
+14
-14
@@ -20,14 +20,14 @@
|
||||
*/
|
||||
/*
|
||||
File: exif.cpp
|
||||
Version: $Name: $ $Revision: 1.40 $
|
||||
Version: $Name: $ $Revision: 1.41 $
|
||||
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
History: 26-Jan-04, ahu: created
|
||||
11-Feb-04, ahu: isolated as a component
|
||||
*/
|
||||
// *****************************************************************************
|
||||
#include "rcsid.hpp"
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.40 $ $RCSfile: exif.cpp,v $")
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.41 $ $RCSfile: exif.cpp,v $")
|
||||
|
||||
// Define DEBUG_MAKERNOTE to output debug information to std::cerr
|
||||
#undef DEBUG_MAKERNOTE
|
||||
@@ -63,17 +63,17 @@ namespace {
|
||||
with the value of offset. If no entry with this tag exists in ifd, an
|
||||
entry of type unsigned long with one component is created.
|
||||
*/
|
||||
void setOffsetTag(Exif::Ifd& ifd,
|
||||
void setOffsetTag(Exiv2::Ifd& ifd,
|
||||
int idx,
|
||||
Exif::uint16 tag,
|
||||
Exif::uint32 offset,
|
||||
Exif::ByteOrder byteOrder);
|
||||
Exiv2::uint16 tag,
|
||||
Exiv2::uint32 offset,
|
||||
Exiv2::ByteOrder byteOrder);
|
||||
|
||||
}
|
||||
|
||||
// *****************************************************************************
|
||||
// class member definitions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
Metadatum::Metadatum(const Entry& e, ByteOrder byteOrder)
|
||||
: tag_(e.tag()), ifdId_(e.ifdId()), idx_(e.idx()),
|
||||
@@ -1186,21 +1186,21 @@ namespace Exif {
|
||||
return p;
|
||||
}
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
// *****************************************************************************
|
||||
// local definitions
|
||||
namespace {
|
||||
|
||||
void setOffsetTag(Exif::Ifd& ifd,
|
||||
void setOffsetTag(Exiv2::Ifd& ifd,
|
||||
int idx,
|
||||
Exif::uint16 tag,
|
||||
Exif::uint32 offset,
|
||||
Exif::ByteOrder byteOrder)
|
||||
Exiv2::uint16 tag,
|
||||
Exiv2::uint32 offset,
|
||||
Exiv2::ByteOrder byteOrder)
|
||||
{
|
||||
Exif::Ifd::iterator pos = ifd.findTag(tag);
|
||||
Exiv2::Ifd::iterator pos = ifd.findTag(tag);
|
||||
if (pos == ifd.end()) {
|
||||
Exif::Entry e(ifd.alloc());
|
||||
Exiv2::Entry e(ifd.alloc());
|
||||
e.setIfdId(ifd.ifdId());
|
||||
e.setIdx(idx);
|
||||
e.setTag(tag);
|
||||
|
||||
+8
-4
@@ -21,7 +21,7 @@
|
||||
/*!
|
||||
@file exif.hpp
|
||||
@brief Encoding and decoding of %Exif data
|
||||
@version $Name: $ $Revision: 1.39 $
|
||||
@version $Name: $ $Revision: 1.40 $
|
||||
@author Andreas Huggel (ahu)
|
||||
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
|
||||
@date 09-Jan-04, ahu: created
|
||||
@@ -45,8 +45,12 @@
|
||||
|
||||
// *****************************************************************************
|
||||
// namespace extensions
|
||||
//! Provides classes and functions to encode and decode %Exif data.
|
||||
namespace Exif {
|
||||
/*!
|
||||
@brief Provides classes and functions to encode and decode %Exif data.
|
||||
This namespace corresponds to the <b>libexiv2</b> library.
|
||||
|
||||
*/
|
||||
namespace Exiv2 {
|
||||
|
||||
// *****************************************************************************
|
||||
// class declarations
|
||||
@@ -882,6 +886,6 @@ namespace Exif {
|
||||
std::pair<uint16, IfdId> decomposeKey(const std::string& key,
|
||||
const MakerNote* makerNote);
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
#endif // #ifndef EXIF_HPP_
|
||||
|
||||
+7
-7
@@ -3,7 +3,7 @@
|
||||
Abstract : Sample program to print the Exif metadata of an image
|
||||
|
||||
File: exifprint.cpp
|
||||
Version : $Name: $ $Revision: 1.12 $
|
||||
Version : $Name: $ $Revision: 1.13 $
|
||||
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
History : 26-Jan-04, ahu: created
|
||||
*/
|
||||
@@ -29,15 +29,15 @@ try {
|
||||
return 1;
|
||||
}
|
||||
|
||||
Exif::ExifData exifData;
|
||||
Exiv2::ExifData exifData;
|
||||
int rc = exifData.read(argv[1]);
|
||||
if (rc) {
|
||||
std::string error = readError(rc, argv[1]);
|
||||
throw Exif::Error(error);
|
||||
throw Exiv2::Error(error);
|
||||
}
|
||||
|
||||
Exif::ExifData::const_iterator end = exifData.end();
|
||||
for (Exif::ExifData::const_iterator i = exifData.begin(); i != end; ++i) {
|
||||
Exiv2::ExifData::const_iterator end = exifData.end();
|
||||
for (Exiv2::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
|
||||
@@ -48,7 +48,7 @@ try {
|
||||
|
||||
return rc;
|
||||
}
|
||||
catch (Exif::Error& e) {
|
||||
catch (Exiv2::Error& e) {
|
||||
std::cout << "Caught Exif exception '" << e << "'\n";
|
||||
return -1;
|
||||
}
|
||||
@@ -79,7 +79,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 = " + Exif::toString(rc);
|
||||
error = "Reading Exif data failed, rc = " + Exiv2::toString(rc);
|
||||
break;
|
||||
}
|
||||
return error;
|
||||
|
||||
+4
-4
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
/*
|
||||
File: fujimn.cpp
|
||||
Version: $Name: $ $Revision: 1.3 $
|
||||
Version: $Name: $ $Revision: 1.4 $
|
||||
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
History: 18-Feb-04, ahu: created
|
||||
07-Mar-04, ahu: isolated as a separate component
|
||||
@@ -31,7 +31,7 @@
|
||||
*/
|
||||
// *****************************************************************************
|
||||
#include "rcsid.hpp"
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.3 $ $RCSfile: fujimn.cpp,v $")
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.4 $ $RCSfile: fujimn.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// included header files
|
||||
@@ -50,7 +50,7 @@ EXIV2_RCSID("@(#) $Name: $ $Revision: 1.3 $ $RCSfile: fujimn.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// class member definitions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
const FujiMakerNote::RegisterMakerNote FujiMakerNote::register_;
|
||||
|
||||
@@ -231,4 +231,4 @@ namespace Exif {
|
||||
return new FujiMakerNote(alloc);
|
||||
}
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
+3
-3
@@ -24,7 +24,7 @@
|
||||
in "Appendix 4: Makernote of Fujifilm" of the document
|
||||
"Exif file format" by TsuruZoh Tachibanaya
|
||||
<http://park2.wakwak.com/%7Etsuruzoh/Computer/Digicams/exif-e.html>
|
||||
@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 11-Feb-04, ahu: created
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
// *****************************************************************************
|
||||
// namespace extensions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
// *****************************************************************************
|
||||
// class declarations
|
||||
@@ -141,6 +141,6 @@ namespace Exif {
|
||||
|
||||
}; // class FujiMakerNote
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
#endif // #ifndef FUJIMN_HPP_
|
||||
|
||||
+4
-4
@@ -20,14 +20,14 @@
|
||||
*/
|
||||
/*
|
||||
File: ifd.cpp
|
||||
Version: $Name: $ $Revision: 1.16 $
|
||||
Version: $Name: $ $Revision: 1.17 $
|
||||
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
History: 26-Jan-04, ahu: created
|
||||
11-Feb-04, ahu: isolated as a component
|
||||
*/
|
||||
// *****************************************************************************
|
||||
#include "rcsid.hpp"
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.16 $ $RCSfile: ifd.cpp,v $")
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.17 $ $RCSfile: ifd.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// included header files
|
||||
@@ -47,7 +47,7 @@ EXIV2_RCSID("@(#) $Name: $ $Revision: 1.16 $ $RCSfile: ifd.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// class member definitions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
Entry::Entry(bool alloc)
|
||||
: alloc_(alloc), ifdId_(ifdIdNotSet), idx_(0), pMakerNote_(0),
|
||||
@@ -498,4 +498,4 @@ namespace Exif {
|
||||
return lhs.offset_ < rhs.offset_;
|
||||
} // cmpPreEntriesByOffset
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@
|
||||
/*!
|
||||
@file ifd.hpp
|
||||
@brief Encoding and decoding of IFD (Image File Directory) data
|
||||
@version $Name: $ $Revision: 1.14 $
|
||||
@version $Name: $ $Revision: 1.15 $
|
||||
@author Andreas Huggel (ahu)
|
||||
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
|
||||
@date 09-Jan-04, ahu: created
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
// *****************************************************************************
|
||||
// namespace extensions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
// *****************************************************************************
|
||||
// class declarations
|
||||
@@ -502,6 +502,6 @@ namespace Exif {
|
||||
*/
|
||||
bool cmpPreEntriesByOffset(const Ifd::PreEntry& lhs, const Ifd::PreEntry& rhs);
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
#endif // #ifndef IFD_HPP_
|
||||
|
||||
+4
-4
@@ -20,14 +20,14 @@
|
||||
*/
|
||||
/*
|
||||
File: image.cpp
|
||||
Version: $Name: $ $Revision: 1.12 $
|
||||
Version: $Name: $ $Revision: 1.13 $
|
||||
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
History: 26-Jan-04, ahu: created
|
||||
11-Feb-04, ahu: isolated as a component
|
||||
*/
|
||||
// *****************************************************************************
|
||||
#include "rcsid.hpp"
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.12 $ $RCSfile: image.cpp,v $")
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.13 $ $RCSfile: image.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// included header files
|
||||
@@ -44,7 +44,7 @@ EXIV2_RCSID("@(#) $Name: $ $Revision: 1.12 $ $RCSfile: image.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// class member definitions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
ImageFactory* ImageFactory::pInstance_ = 0;
|
||||
|
||||
@@ -574,4 +574,4 @@ namespace Exif {
|
||||
return 0;
|
||||
} // ExvFile::writeExifData
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@
|
||||
/*!
|
||||
@file image.hpp
|
||||
@brief Class JpegImage to access JPEG images
|
||||
@version $Name: $ $Revision: 1.11 $
|
||||
@version $Name: $ $Revision: 1.12 $
|
||||
@author Andreas Huggel (ahu)
|
||||
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
|
||||
@date 09-Jan-04, ahu: created
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
// *****************************************************************************
|
||||
// namespace extensions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
// *****************************************************************************
|
||||
// class definitions
|
||||
@@ -531,6 +531,6 @@ namespace Exif {
|
||||
|
||||
}; // class ExvFile
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
#endif // #ifndef IMAGE_HPP_
|
||||
|
||||
@@ -36,7 +36,7 @@ int main()
|
||||
|
||||
void testMatch(const std::string& reg, const std::string& key)
|
||||
{
|
||||
std::pair<bool, int> rc = Exif::MakerNoteFactory::match(reg, key);
|
||||
std::pair<bool, int> rc = Exiv2::MakerNoteFactory::match(reg, key);
|
||||
|
||||
if (rc.first) {
|
||||
std::cout << "Key '" << key << "' matches '" << reg << "' in "
|
||||
|
||||
+4
-4
@@ -20,13 +20,13 @@
|
||||
*/
|
||||
/*
|
||||
File: makernote.cpp
|
||||
Version: $Name: $ $Revision: 1.16 $
|
||||
Version: $Name: $ $Revision: 1.17 $
|
||||
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
History: 18-Feb-04, ahu: created
|
||||
*/
|
||||
// *****************************************************************************
|
||||
#include "rcsid.hpp"
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.16 $ $RCSfile: makernote.cpp,v $")
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.17 $ $RCSfile: makernote.cpp,v $")
|
||||
|
||||
// Define DEBUG_MAKERNOTE to output debug information to std::cerr
|
||||
#undef DEBUG_MAKERNOTE
|
||||
@@ -48,7 +48,7 @@ EXIV2_RCSID("@(#) $Name: $ $Revision: 1.16 $ $RCSfile: makernote.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// class member definitions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
std::string MakerNote::makeKey(uint16 tag) const
|
||||
{
|
||||
@@ -383,4 +383,4 @@ namespace Exif {
|
||||
|
||||
} // MakerNoteFactory::match
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
+3
-3
@@ -22,7 +22,7 @@
|
||||
@file makernote.hpp
|
||||
@brief Contains the %Exif %MakerNote interface, IFD %MakerNote and a
|
||||
MakerNote factory
|
||||
@version $Name: $ $Revision: 1.15 $
|
||||
@version $Name: $ $Revision: 1.16 $
|
||||
@author Andreas Huggel (ahu)
|
||||
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
|
||||
@date 18-Feb-04, ahu: created
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
// *****************************************************************************
|
||||
// namespace extensions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
// *****************************************************************************
|
||||
// class declarations
|
||||
@@ -415,6 +415,6 @@ namespace Exif {
|
||||
|
||||
}; // class MakerNoteFactory
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
#endif // #ifndef MAKERNOTE_HPP_
|
||||
|
||||
+4
-4
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
/*
|
||||
File: sigmamn.cpp
|
||||
Version: $Name: $ $Revision: 1.2 $
|
||||
Version: $Name: $ $Revision: 1.3 $
|
||||
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
History: 02-Apr-04, ahu: created
|
||||
Credits: Sigma and Foveon MakerNote implemented according to the specification
|
||||
@@ -29,7 +29,7 @@
|
||||
*/
|
||||
// *****************************************************************************
|
||||
#include "rcsid.hpp"
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.2 $ $RCSfile: sigmamn.cpp,v $")
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.3 $ $RCSfile: sigmamn.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// included header files
|
||||
@@ -48,7 +48,7 @@ EXIV2_RCSID("@(#) $Name: $ $Revision: 1.2 $ $RCSfile: sigmamn.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// class member definitions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
const SigmaMakerNote::RegisterMakerNote SigmaMakerNote::register_;
|
||||
|
||||
@@ -164,4 +164,4 @@ namespace Exif {
|
||||
return new SigmaMakerNote(alloc);
|
||||
}
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
+3
-3
@@ -23,7 +23,7 @@
|
||||
@brief Sigma and Foveon MakerNote implemented according to the specification
|
||||
in "SIGMA and FOVEON EXIF MakerNote Documentation" by Foveon.
|
||||
<http://www.x3f.info/technotes/FileDocs/MakerNoteDoc.html>
|
||||
@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 02-Apr-04, ahu: created
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
// *****************************************************************************
|
||||
// namespace extensions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
// *****************************************************************************
|
||||
// class declarations
|
||||
@@ -130,6 +130,6 @@ namespace Exif {
|
||||
|
||||
}; // class SigmaMakerNote
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
#endif // #ifndef SIGMAMN_HPP_
|
||||
|
||||
+3
-3
@@ -3,13 +3,13 @@
|
||||
Abstract: Print a simple comma separated list of tags defined in Exiv2
|
||||
|
||||
File: taglist.cpp
|
||||
Version: $Name: $ $Revision: 1.4 $
|
||||
Version: $Name: $ $Revision: 1.5 $
|
||||
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
History: 07-Jan-04, ahu: created
|
||||
*/
|
||||
// *****************************************************************************
|
||||
#include "rcsid.hpp"
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.4 $ $RCSfile: taglist.cpp,v $")
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.5 $ $RCSfile: taglist.cpp,v $")
|
||||
|
||||
#include "makernote.hpp"
|
||||
#include "tags.hpp"
|
||||
@@ -18,7 +18,7 @@ EXIV2_RCSID("@(#) $Name: $ $Revision: 1.4 $ $RCSfile: taglist.cpp,v $")
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
using namespace Exif;
|
||||
using namespace Exiv2;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
try {
|
||||
|
||||
+4
-4
@@ -20,13 +20,13 @@
|
||||
*/
|
||||
/*
|
||||
File: tags.cpp
|
||||
Version: $Name: $ $Revision: 1.25 $
|
||||
Version: $Name: $ $Revision: 1.26 $
|
||||
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
History: 15-Jan-04, ahu: created
|
||||
*/
|
||||
// *****************************************************************************
|
||||
#include "rcsid.hpp"
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.25 $ $RCSfile: tags.cpp,v $")
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.26 $ $RCSfile: tags.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// included header files
|
||||
@@ -43,7 +43,7 @@ EXIV2_RCSID("@(#) $Name: $ $Revision: 1.25 $ $RCSfile: tags.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// class member definitions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
IfdInfo::IfdInfo(IfdId ifdId, const char* name, const char* item)
|
||||
: ifdId_(ifdId), name_(name), item_(item)
|
||||
@@ -958,4 +958,4 @@ namespace Exif {
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@
|
||||
/*!
|
||||
@file tags.hpp
|
||||
@brief %Exif tag and type information
|
||||
@version $Name: $ $Revision: 1.20 $
|
||||
@version $Name: $ $Revision: 1.21 $
|
||||
@author Andreas Huggel (ahu)
|
||||
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
|
||||
@date 15-Jan-04, ahu: created
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
// *****************************************************************************
|
||||
// namespace extensions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
// *****************************************************************************
|
||||
// class declarations
|
||||
@@ -276,6 +276,6 @@ namespace Exif {
|
||||
//! Print subject distance range
|
||||
std::ostream& print0xa40c(std::ostream& os, const Value& value);
|
||||
//@}
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
#endif // #ifndef TAGS_HPP_
|
||||
|
||||
+4
-4
@@ -20,14 +20,14 @@
|
||||
*/
|
||||
/*
|
||||
File: types.cpp
|
||||
Version: $Name: $ $Revision: 1.6 $
|
||||
Version: $Name: $ $Revision: 1.7 $
|
||||
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
History: 26-Jan-04, ahu: created
|
||||
11-Feb-04, ahu: isolated as a component
|
||||
*/
|
||||
// *****************************************************************************
|
||||
#include "rcsid.hpp"
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.6 $ $RCSfile: types.cpp,v $")
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.7 $ $RCSfile: types.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// included header files
|
||||
@@ -42,7 +42,7 @@ EXIV2_RCSID("@(#) $Name: $ $Revision: 1.6 $ $RCSfile: types.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// class member definitions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
TypeInfoTable::TypeInfoTable(TypeId typeId, const char* name, long size)
|
||||
: typeId_(typeId), name_(name), size_(size)
|
||||
@@ -262,4 +262,4 @@ namespace Exif {
|
||||
return b;
|
||||
} // lgcd
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@
|
||||
/*!
|
||||
@file types.hpp
|
||||
@brief Type definitions for Exiv2 and related functionality
|
||||
@version $Name: $ $Revision: 1.9 $
|
||||
@version $Name: $ $Revision: 1.10 $
|
||||
@author Andreas Huggel (ahu)
|
||||
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
|
||||
@date 09-Jan-04, ahu: created
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
// *****************************************************************************
|
||||
// namespace extensions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
// *****************************************************************************
|
||||
// type definitions
|
||||
@@ -220,6 +220,6 @@ namespace Exif {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
#endif // #ifndef TYPES_HPP_
|
||||
|
||||
+4
-4
@@ -20,14 +20,14 @@
|
||||
*/
|
||||
/*
|
||||
File: value.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
|
||||
11-Feb-04, ahu: isolated as a component
|
||||
*/
|
||||
// *****************************************************************************
|
||||
#include "rcsid.hpp"
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.4 $ $RCSfile: value.cpp,v $")
|
||||
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.5 $ $RCSfile: value.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// included header files
|
||||
@@ -40,7 +40,7 @@ EXIV2_RCSID("@(#) $Name: $ $Revision: 1.4 $ $RCSfile: value.cpp,v $")
|
||||
|
||||
// *****************************************************************************
|
||||
// class member definitions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
Value& Value::operator=(const Value& rhs)
|
||||
{
|
||||
@@ -192,4 +192,4 @@ namespace Exif {
|
||||
return os << value_.substr(0, pos + 1);
|
||||
}
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@
|
||||
/*!
|
||||
@file value.hpp
|
||||
@brief Value interface and concrete subclasses
|
||||
@version $Name: $ $Revision: 1.7 $
|
||||
@version $Name: $ $Revision: 1.8 $
|
||||
@author Andreas Huggel (ahu)
|
||||
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
|
||||
@date 09-Jan-04, ahu: created
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
// *****************************************************************************
|
||||
// namespace extensions
|
||||
namespace Exif {
|
||||
namespace Exiv2 {
|
||||
|
||||
// *****************************************************************************
|
||||
// class definitions
|
||||
@@ -656,6 +656,6 @@ namespace Exif {
|
||||
return Rational(value_[n].first, value_[n].second);
|
||||
}
|
||||
|
||||
} // namespace Exif
|
||||
} // namespace Exiv2
|
||||
|
||||
#endif // #ifndef VALUE_HPP_
|
||||
|
||||
+3
-3
@@ -3,7 +3,7 @@
|
||||
Abstract : ExifData write unit tests
|
||||
|
||||
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
Version : $Name: $ $Revision: 1.3 $
|
||||
Version : $Name: $ $Revision: 1.4 $
|
||||
|
||||
Test procedure:
|
||||
$ rm -f test.jpg thumb.jpg iii ttt;
|
||||
@@ -27,7 +27,7 @@
|
||||
// *****************************************************************************
|
||||
// local declarations
|
||||
|
||||
using namespace Exif;
|
||||
using namespace Exiv2;
|
||||
|
||||
void testCase(const std::string& file1,
|
||||
const std::string& file2,
|
||||
@@ -129,7 +129,7 @@ void testCase(const std::string& file1,
|
||||
}
|
||||
|
||||
std::cerr << "---> Modifying Exif data\n";
|
||||
Exif::ExifData::iterator pos = ed1.findKey(key);
|
||||
Exiv2::ExifData::iterator pos = ed1.findKey(key);
|
||||
if (pos == ed1.end()) {
|
||||
throw Error("Metadatum with key = " + key + " not found");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user