diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2006-12-30 14:47:26 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2006-12-30 14:47:26 +0100 |
commit | 3fb90fdeaa5d1a557c93aa339094b93a7da5c5af (patch) | |
tree | a0efc621450292c176a973c2e70c46d01c94df93 /src/libpyexiv2_wrapper.cpp | |
download | pyexiv2-3fb90fdeaa5d1a557c93aa339094b93a7da5c5af.tar.gz |
Initial import of the existing sources for the project.
These source files were written in September 2006 in Hull as part of another project, and are now becoming a standalone python library.
Diffstat (limited to 'src/libpyexiv2_wrapper.cpp')
-rw-r--r-- | src/libpyexiv2_wrapper.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/libpyexiv2_wrapper.cpp b/src/libpyexiv2_wrapper.cpp new file mode 100644 index 0000000..494033e --- /dev/null +++ b/src/libpyexiv2_wrapper.cpp @@ -0,0 +1,48 @@ +// ***************************************************************************** +/* + * Copyright (C) 2006 Olivier Tilloy <olivier@tilloy.net> + * + * This program is part of the pyexiv2 distribution. + * + * pyexiv2 is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA. + */ +/* + File: libpyexiv2_wrapper.cpp + Author(s): Olivier Tilloy <olivier@tilloy.net> + History: 28-Dec-06, Olivier Tilloy: created + */ +// ***************************************************************************** + +#include "libpyexiv2.hpp" + +#include <boost/python.hpp> + +using namespace boost::python; + +using namespace LibPyExiv2; + +BOOST_PYTHON_MODULE(libpyexiv2) +{ + class_<Image>("Image", init<std::string>()) + .def("readMetadata", &Image::readMetadata) + .def("writeMetadata", &Image::writeMetadata) + .def("getAvailableExifTags", &Image::getAvailableExifTags) + .def("getExifTag", &Image::getExifTag) + .def("getExifTagToString", &Image::getExifTagToString) + .def("setExifTag", &Image::setExifTag) + .def("deleteExifTag", &Image::deleteExifTag) + .def("getAvailableIptcTags", &Image::getAvailableIptcTags) + ; +} |