aboutsummaryrefslogtreecommitdiffstats
path: root/src/exiv2wrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/exiv2wrapper.cpp')
-rw-r--r--src/exiv2wrapper.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/exiv2wrapper.cpp b/src/exiv2wrapper.cpp
index 8d22e69..83a3c95 100644
--- a/src/exiv2wrapper.cpp
+++ b/src/exiv2wrapper.cpp
@@ -123,36 +123,27 @@ boost::python::tuple Image::getExifTag(std::string key)
}
}
-/*
-boost::python::tuple Image::setExifTag(std::string key, std::string value)
+void Image::setExifTag(std::string key, std::string value)
{
- boost::python::tuple returnValue;
if(_dataRead)
{
Exiv2::ExifKey exifKey = Exiv2::ExifKey(key);
Exiv2::ExifMetadata::iterator i = _exifData.findKey(exifKey);
if(i != _exifData.end())
{
- Exiv2::Exifdatum exifDatum = _exifData[key];
- returnValue = boost::python::make_tuple(std::string(exifDatum.typeName()), exifDatum.toString());
- // First erase the existing tag: in some case (and
- // I don't know why), the new value won't replace
- // the old one if not previously erased...
+ // First erase the existing tag: in some case (and I don't know
+ // why), the new value won't replace the old one if not previously
+ // erased...
+ // TODO: check if this is still valid with libexiv2 0.18
_exifData.erase(i);
}
- else
- {
- // The key was not found
- returnValue = boost::python::make_tuple(std::string(""), std::string(""));
- }
_exifData[key] = value;
- return returnValue;
}
else
throw Exiv2::Error(METADATA_NOT_READ);
}
-boost::python::tuple Image::deleteExifTag(std::string key)
+/*boost::python::tuple Image::deleteExifTag(std::string key)
{
boost::python::tuple returnValue;
if(_dataRead)