diff options
-rw-r--r-- | src/libpyexiv2.cpp | 12 | ||||
-rw-r--r-- | src/libpyexiv2.hpp | 12 | ||||
-rw-r--r-- | src/libpyexiv2_wrapper.cpp | 2 |
3 files changed, 26 insertions, 0 deletions
diff --git a/src/libpyexiv2.cpp b/src/libpyexiv2.cpp index aad8614..f203ec7 100644 --- a/src/libpyexiv2.cpp +++ b/src/libpyexiv2.cpp @@ -396,4 +396,16 @@ namespace LibPyExiv2 } } + boost::python::tuple Image::getThumbnailData() + { + //TODO + return boost::python::make_tuple(std::string(""), std::string("")); + } + + bool Image::setThumbnailData(boost::python::tuple data) + { + //TODO + return true; + } + } // End of namespace LibPyExiv2 diff --git a/src/libpyexiv2.hpp b/src/libpyexiv2.hpp index c650236..61f46b4 100644 --- a/src/libpyexiv2.hpp +++ b/src/libpyexiv2.hpp @@ -98,6 +98,18 @@ namespace LibPyExiv2 // type and previous value if it existed, empty strings otherwise. boost::python::tuple deleteIptcTag(std::string key); + // Read and write access to the thumbnail embedded in the image. + + // Returns a tuple containing the format of the thumbnail ("TIFF" or + // "JPEG") and the thumbnail raw data as a string buffer. + boost::python::tuple getThumbnailData(); + + // Sets the thumbnail of the image. The first element of the tuple is + // the format of the thumbnail ("TIFF" or "JPEG") and the second element + // is the thumbnail raw data as a string buffer. + // Returns true if successful, false otherwise. + bool setThumbnailData(boost::python::tuple data); + private: std::string _filename; Exiv2::Image::AutoPtr _image; diff --git a/src/libpyexiv2_wrapper.cpp b/src/libpyexiv2_wrapper.cpp index 6f1a275..3d89c2c 100644 --- a/src/libpyexiv2_wrapper.cpp +++ b/src/libpyexiv2_wrapper.cpp @@ -48,5 +48,7 @@ BOOST_PYTHON_MODULE(libpyexiv2) .def("getIptcTag", &Image::getIptcTag) .def("setIptcTag", &Image::setIptcTag) .def("deleteIptcTag", &Image::deleteIptcTag) + .def("getThumbnailData", &Image::getThumbnailData) + .def("setThumbnailData", &Image::setThumbnailData) ; } |