diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2010-01-08 09:23:32 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2010-01-08 09:23:32 +0100 |
commit | 8b3562b019794802f26ceb4f0761b47c876b2e08 (patch) | |
tree | 974202e416c5ebea5c229befe5b7347492ae0fe3 /src/exiv2wrapper_python.cpp | |
parent | 1e734d541139d3f7183bcf55b105d9b44930940b (diff) | |
download | pyexiv2-8b3562b019794802f26ceb4f0761b47c876b2e08.tar.gz |
Preview (thumbnail) extraction.
Read-only at the moment.
Diffstat (limited to 'src/exiv2wrapper_python.cpp')
-rw-r--r-- | src/exiv2wrapper_python.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/exiv2wrapper_python.cpp b/src/exiv2wrapper_python.cpp index bce46fa..a5f9d6d 100644 --- a/src/exiv2wrapper_python.cpp +++ b/src/exiv2wrapper_python.cpp @@ -93,6 +93,15 @@ BOOST_PYTHON_MODULE(libexiv2python) .def("_getLangAltValue", &XmpTag::getLangAltValue) ; + class_<Preview>("Preview", init<Exiv2::PreviewImage>()) + + .def_readonly("mime_type", &Preview::_mimeType) + .def_readonly("extension", &Preview::_extension) + .def_readonly("size", &Preview::_size) + .def_readonly("dimensions", &Preview::_dimensions) + .def_readonly("data", &Preview::_data) + ; + class_<Image>("Image", init<std::string>()) .def("readMetadata", &Image::readMetadata) @@ -115,6 +124,8 @@ BOOST_PYTHON_MODULE(libexiv2python) .def("setXmpTagLangAltValue", &Image::setXmpTagLangAltValue) .def("deleteXmpTag", &Image::deleteXmpTag) + .def("previews", &Image::previews) + // .def("getThumbnailData", &Image::getThumbnailData) // .def("setThumbnailData", &Image::setThumbnailData) // .def("deleteThumbnail", &Image::deleteThumbnail) |