aboutsummaryrefslogtreecommitdiffstats
path: root/src/exiv2wrapper_python.cpp
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2010-05-20 16:53:49 +0200
committerOlivier Tilloy <olivier@tilloy.net>2010-05-20 16:53:49 +0200
commitb43439d0b4dcd3659d941642c79e6837d4330a64 (patch)
tree1d501334ffc01f3ba1c4ab9739803078dc5601bd /src/exiv2wrapper_python.cpp
parent871d02851b48a1db75068c6edc524c17ca2511a4 (diff)
downloadpyexiv2-b43439d0b4dcd3659d941642c79e6837d4330a64.tar.gz
Thin wrapper on top of libexiv2python.Preview, for a better encapsulation.
Diffstat (limited to 'src/exiv2wrapper_python.cpp')
-rw-r--r--src/exiv2wrapper_python.cpp31
1 files changed, 9 insertions, 22 deletions
diff --git a/src/exiv2wrapper_python.cpp b/src/exiv2wrapper_python.cpp
index faa9b81..e5855c4 100644
--- a/src/exiv2wrapper_python.cpp
+++ b/src/exiv2wrapper_python.cpp
@@ -96,28 +96,15 @@ BOOST_PYTHON_MODULE(libexiv2python)
.def("_getLangAltValue", &XmpTag::getLangAltValue)
;
- class_<Preview>("Preview",
- "A preview image (properties and data buffer) embedded in "
- "image metadata.",
- init<Exiv2::PreviewImage>())
-
- .def_readonly("mime_type", &Preview::_mimeType,
- "The mime type of the preview image (e.g. 'image/jpeg')")
- .def_readonly("extension", &Preview::_extension,
- "The file extension of the preview image with a leading "
- "dot (e.g. '.jpg')")
- .def_readonly("size", &Preview::_size,
- "The size of the preview image in bytes")
- .def_readonly("dimensions", &Preview::_dimensions,
- "A tuple containing the width and height of the preview "
- "image in pixels")
- .def_readonly("data", &Preview::_data,
- "The preview image data buffer")
-
- .def("write_to_file", &Preview::writeToFile,
- "Write the preview image to a file on disk.\n"
- "The file extension will be automatically appended to the path\n"
- "passed in parameter.")
+ 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)
+
+ .def("write_to_file", &Preview::writeToFile)
;
class_<Image>("_Image", init<std::string>())