Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for wider channel size in f3d::image #858

Merged
merged 24 commits into from
Jul 10, 2023
Prev Previous commit
Next Next commit
fix deprecated python
  • Loading branch information
Meakk committed Jul 10, 2023
commit 15ccc58c2628a179a677511a2cb7da4c8dc92def
16 changes: 14 additions & 2 deletions python/F3DPythonBindings.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,19 @@ PYBIND11_MODULE(f3d, module)
return img.setChannelCount(channels);
});

image.def("setData", setImageBytes);
image.def("getData", getImageBytes);
image.def("setData",
[=](f3d::image& img, const py::bytes& data)
{
PyErr_WarnEx(PyExc_DeprecationWarning,
"setData is deprecated, use setContent instead.", 1);
setImageBytes(img, data);
});
image.def("getData",
[=](const f3d::image& img)
{
PyErr_WarnEx(PyExc_DeprecationWarning,
"getData is deprecated, use getContent instead.", 1);
getImageBytes(img);
});
#endif
}