aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2009-03-13 21:30:06 +0100
committerOlivier Tilloy <olivier@tilloy.net>2009-03-13 21:30:06 +0100
commite6f142d7a01ed42229d442de8c11faf8c4973312 (patch)
tree6c108dfd0bab30b93ef2c4c80b96664dd399bd23
parent238ba6d4ffef91922735d222d3113c311ba15efa (diff)
downloadpyexiv2-e6f142d7a01ed42229d442de8c11faf8c4973312.tar.gz
Adapted the setThumbnailData and deleteThumbnail methods to the API of libexiv2 0.18.
-rw-r--r--src/libpyexiv2.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libpyexiv2.cpp b/src/libpyexiv2.cpp
index 12e64fc..b5a81fc 100644
--- a/src/libpyexiv2.cpp
+++ b/src/libpyexiv2.cpp
@@ -342,8 +342,9 @@ namespace LibPyExiv2
{
if(_dataRead)
{
+ Exiv2::ExifThumb thumbnail(_exifData);
const Exiv2::byte* dataBuf = (const Exiv2::byte*) data.c_str();
- //_exifData.setJpegThumbnail(dataBuf, data.size());
+ thumbnail.setJpegThumbnail(dataBuf, data.size());
}
else
throw Exiv2::Error(METADATA_NOT_READ);
@@ -352,8 +353,10 @@ namespace LibPyExiv2
void Image::deleteThumbnail()
{
if(_dataRead)
- //_exifData.eraseThumbnail();
- 1;
+ {
+ Exiv2::ExifThumb thumbnail(_exifData);
+ thumbnail.erase();
+ }
else
throw Exiv2::Error(METADATA_NOT_READ);
}