Skip to content

Commit

Permalink
chore(python): add 3.8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
craftablescience committed Nov 11, 2024
1 parent 9f8151b commit dadb2e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lang/python/cfg/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down
2 changes: 1 addition & 1 deletion lang/python/src/vtfpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ void register_python(py::module_& m) {
using namespace ImageConversion;
auto ImageConversion = vtfpp.def_submodule("ImageConversion");

// todo(python): still need to bind the following:
ImageConversion.def("convert_image_data_to_format", [](const py::bytes& imageData, ImageFormat oldFormat, ImageFormat newFormat, uint16_t width, uint16_t height) {
const auto d = convertImageDataToFormat({reinterpret_cast<const std::byte*>(imageData.data()), imageData.size()}, oldFormat, newFormat, width, height);
return py::bytes{d.data(), d.size()};
Expand Down Expand Up @@ -183,6 +182,7 @@ void register_python(py::module_& m) {
}, py::arg("image_data"), py::arg("format"), py::arg("width"), py::arg("new_width"), py::arg("width_resize"), py::arg("height"), py::arg("new_height"), py::arg("height_resize"), py::arg("srgb"), py::arg("filter"), py::arg("edge") = ResizeEdge::CLAMP);

// Skip extractChannelFromImageData, difficult to bind
// Skip applyChannelToImageData, difficult to bind
}

py::class_<PPL::Image>(vtfpp, "PPLImage")
Expand Down

0 comments on commit dadb2e3

Please sign in to comment.