-
Notifications
You must be signed in to change notification settings - Fork 0
/
pymain.cpp
26 lines (22 loc) · 1013 Bytes
/
pymain.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include<iostream>
#include <pybind11/pybind11.h>
#include "include/ImgEdit.hpp"
namespace py = pybind11;
using namespace std;
PYBIND11_MODULE(pyImageEdits, m) {
m.doc() = "A sample add function";
py::class_<ImageEdits>(m, "ImageEdits")
.def(py::init())
.def("read_image", &ImageEdits::read_image)
.def("write_image", &ImageEdits::write_image)
.def("horizontal_flip", &ImageEdits::horizontal_flip)
.def("vertical_flip", &ImageEdits::vertical_flip)
.def("resize", &ImageEdits::resize)
.def("set_width", &ImageEdits::set_width)
.def("set_height", &ImageEdits::set_height)
.def("applyfilter_red", &ImageEdits::applyfilter_red)
.def("applyfilter_green", &ImageEdits::applyfilter_green)
.def("applyfilter_blue", &ImageEdits::applyfilter_blue)
.def("applyfilter_grayscale", &ImageEdits::applyfilter_grayscale)
.def("adjust_brightness", &ImageEdits::adjust_brightness);
}