From 02c86c9d2f109b4a5e7836e5bd9465724ab4c90e Mon Sep 17 00:00:00 2001 From: Olivier Tilloy Date: Tue, 2 Jan 2007 20:08:00 +0100 Subject: Added the declaration of methods for accessing the thumbnail data (not implemented yet). --- src/libpyexiv2.cpp | 12 ++++++++++++ src/libpyexiv2.hpp | 12 ++++++++++++ src/libpyexiv2_wrapper.cpp | 2 ++ 3 files changed, 26 insertions(+) (limited to 'src') 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) ; } -- cgit