aboutsummaryrefslogtreecommitdiffstats
path: root/src/libpyexiv2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libpyexiv2.cpp')
-rw-r--r--src/libpyexiv2.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/libpyexiv2.cpp b/src/libpyexiv2.cpp
index 96b9ba1..040e060 100644
--- a/src/libpyexiv2.cpp
+++ b/src/libpyexiv2.cpp
@@ -378,6 +378,36 @@ namespace LibPyExiv2
throw Exiv2::Error(METADATA_NOT_READ);
}
+ const std::string Image::getComment() const
+ {
+ if(_dataRead)
+ {
+ return _image->comment();
+ }
+ else
+ throw Exiv2::Error(METADATA_NOT_READ);
+ }
+
+ void Image::setComment(const std::string& comment)
+ {
+ if(_dataRead)
+ {
+ _image->setComment(comment);
+ }
+ else
+ throw Exiv2::Error(METADATA_NOT_READ);
+ }
+
+ void Image::clearComment()
+ {
+ if(_dataRead)
+ {
+ _image->clearComment();
+ }
+ else
+ throw Exiv2::Error(METADATA_NOT_READ);
+ }
+
void translateExiv2Error(Exiv2::Error const& e)
{
// Use the Python 'C' API to set up an exception object