aboutsummaryrefslogtreecommitdiffstats
path: root/src/exiv2wrapper.cpp
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2010-12-20 00:41:38 +0100
committerOlivier Tilloy <olivier@tilloy.net>2010-12-20 00:41:38 +0100
commit763b4f82ca485f0799c4b587b9d38a644e07dc36 (patch)
treec8546384d8e7aa89be07e0c377a0fe29f9e88af8 /src/exiv2wrapper.cpp
parent185f414aa8ceb4642b73d065dee3eb70570bb459 (diff)
downloadpyexiv2-763b4f82ca485f0799c4b587b9d38a644e07dc36.tar.gz
Added an iptc_charset property to the ImageMetadata class,
to get, set and delete the (optional) IPTC charset.
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 4df23e9..81c55e0 100644
--- a/src/exiv2wrapper.cpp
+++ b/src/exiv2wrapper.cpp
@@ -518,6 +518,20 @@ void Image::setExifThumbnailFromData(const std::string& data)
_getExifThumbnail()->setJpegThumbnail(buffer, data.size());
}
+const std::string Image::getIptcCharset() const
+{
+ CHECK_METADATA_READ
+ const char* charset = _iptcData->detectCharset();
+ if (charset != 0)
+ {
+ return std::string(charset);
+ }
+ else
+ {
+ return std::string();
+ }
+}
+
ExifTag::ExifTag(const std::string& key,
Exiv2::Exifdatum* datum, Exiv2::ExifData* data,