aboutsummaryrefslogtreecommitdiffstats
path: root/src/exiv2wrapper.cpp
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2009-11-20 18:35:10 +0100
committerOlivier Tilloy <olivier@tilloy.net>2009-11-20 18:35:10 +0100
commitf67e40873fb2078ee8a065e3210aff95251b8cd9 (patch)
tree5679010384af5e71bca631fec05bf7db4f462cdc /src/exiv2wrapper.cpp
parent30c9eab71722eac240e2885b1b259cad96fd2df7 (diff)
downloadpyexiv2-f67e40873fb2078ee8a065e3210aff95251b8cd9.tar.gz
Make Image::getXmpTag return an XmpTag.
Diffstat (limited to 'src/exiv2wrapper.cpp')
-rw-r--r--src/exiv2wrapper.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/exiv2wrapper.cpp b/src/exiv2wrapper.cpp
index e2638b4..be12731 100644
--- a/src/exiv2wrapper.cpp
+++ b/src/exiv2wrapper.cpp
@@ -312,7 +312,7 @@ boost::python::list Image::xmpKeys()
}
}
-boost::python::tuple Image::getXmpTag(std::string key)
+const XmpTag Image::getXmpTag(std::string key)
{
if(!_dataRead)
{
@@ -326,13 +326,7 @@ boost::python::tuple Image::getXmpTag(std::string key)
throw Exiv2::Error(KEY_NOT_FOUND, key);
}
- Exiv2::Xmpdatum xmpDatum = _xmpData[key];
- std::string sTagName = xmpKey.tagName();
- std::string sTagLabel = xmpKey.tagLabel();
- std::string sTagDesc(Exiv2::XmpProperties::propertyDesc(xmpKey));
- std::string sTagType(Exiv2::XmpProperties::propertyInfo(xmpKey)->xmpValueType_);
- std::string sTagValue = xmpDatum.toString();
- return boost::python::make_tuple(key, sTagName, sTagLabel, sTagDesc, sTagType, sTagValue);
+ return XmpTag(key, &_xmpData[key]);
}
void Image::setXmpTagValue(std::string key, std::string value)