aboutsummaryrefslogtreecommitdiffstats
path: root/src/exiv2wrapper.cpp
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2010-11-22 19:27:11 +0100
committerOlivier Tilloy <olivier@tilloy.net>2010-11-22 19:27:11 +0100
commit9c05cd6c979c71836d5c9b284846217d586599f5 (patch)
tree0fcb56a97305931023b9d66c264114bdabfe4b11 /src/exiv2wrapper.cpp
parentf2c84dfdf8c98bb45248ca5c78b7f25c84e7ee27 (diff)
downloadpyexiv2-9c05cd6c979c71836d5c9b284846217d586599f5.tar.gz
Complete implementation of the EXIF thumbnail, including write accessors.
Diffstat (limited to 'src/exiv2wrapper.cpp')
-rw-r--r--src/exiv2wrapper.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/exiv2wrapper.cpp b/src/exiv2wrapper.cpp
index a9060d4..0d80e05 100644
--- a/src/exiv2wrapper.cpp
+++ b/src/exiv2wrapper.cpp
@@ -493,6 +493,22 @@ const std::string Image::getExifThumbnailData()
return data;
}
+void Image::eraseExifThumbnail()
+{
+ _getExifThumbnail()->erase();
+}
+
+void Image::setExifThumbnailFromFile(const std::string& path)
+{
+ _getExifThumbnail()->setJpegThumbnail(path);
+}
+
+void Image::setExifThumbnailFromData(const std::string& data)
+{
+ const Exiv2::byte* buffer = (const Exiv2::byte*) data.c_str();
+ _getExifThumbnail()->setJpegThumbnail(buffer, data.size());
+}
+
ExifTag::ExifTag(const std::string& key, Exiv2::Exifdatum* datum, Exiv2::ExifData* data): _key(key)
{