aboutsummaryrefslogtreecommitdiffstats
path: root/src/exiv2wrapper.cpp
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2009-11-11 10:08:03 +0100
committerOlivier Tilloy <olivier@tilloy.net>2009-11-11 10:08:03 +0100
commita7f87eeba9cfd16e15e58a1cbc8d9e588b6432a9 (patch)
treea6de7c561d7ae29fba35acb463e385bd68d77bcc /src/exiv2wrapper.cpp
parentb1b2341f4092bd3da33a4dc3b6fc0f6f3234f9e5 (diff)
downloadpyexiv2-a7f87eeba9cfd16e15e58a1cbc8d9e588b6432a9.tar.gz
Also expose the EXIF tags' human readable value.
Diffstat (limited to 'src/exiv2wrapper.cpp')
-rw-r--r--src/exiv2wrapper.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/exiv2wrapper.cpp b/src/exiv2wrapper.cpp
index ce0c7fc..34abd6d 100644
--- a/src/exiv2wrapper.cpp
+++ b/src/exiv2wrapper.cpp
@@ -481,12 +481,21 @@ ExifTag::ExifTag(const std::string& key): _key(key), _datum(_key)
_sectionName = Exiv2::ExifTags::sectionName(tag, ifd);
_sectionDescription = Exiv2::ExifTags::sectionDesc(tag, ifd);
_raw_value = _datum.toString();
+ if(_datum.getValue().get() != 0)
+ {
+ std::ostringstream buffer;
+ buffer << _datum;
+ _human_value = buffer.str();
+ }
}
void ExifTag::setRawValue(const std::string& value)
{
_datum.setValue(value);
_raw_value = _datum.toString();
+ std::ostringstream buffer;
+ buffer << _datum;
+ _human_value = buffer.str();
}
const std::string ExifTag::getKey()
@@ -534,6 +543,11 @@ const std::string ExifTag::getRawValue()
return _raw_value;
}
+const std::string ExifTag::getHumanValue()
+{
+ return _human_value;
+}
+
IptcTag::IptcTag(const std::string& key): _key(key), _datum(_key)
{