Add image(buffer, size) API#2961
Conversation
|
You are modifying libf3d public API! |
mwestphal
left a comment
There was a problem hiding this comment.
need some changes, lets focus on the C++ api first.
|
Please request a review when needed :) |
991a1e1 to
6bda499
Compare
Please actually request a review from a maintainer, top right of the PR :) |
6bda499 to
ac5f76f
Compare
|
@mwestphal can you check my latest CI? There are 2 macos_arm (commit, bundle, no-static) jobs and in one of them, the TestUSDRigArmatureWithOpacity testcase (which doesn't seem to be relevant to my commits) fails while the other passes. What's the difference between these two jobs? |
its a flaky test, you can ignore it |
mwestphal
left a comment
There was a problem hiding this comment.
Missing webassembly bindings
|
Please check the PR description checkboxes. |
Maybe @Meakk can help ? :) |
There were some issues with Webassembly/Emscripten, discussed in this thread, i'm currently skipping it for now |
|
Maybe something like that? .class_function("createFromBuffer", +[](emscripten::val jsbuf) -> f3d::image
{
std::vector<unsigned char> data = emscripten::vecFromJSArray<unsigned char>(jsbuf);
return f3d::image(reinterpret_cast<std::byte*>(data.data()), data.size());
}
) |
Describe your changes
Add image(buffer, size) API
Requires vtk version that contains CanReadFile(stream) API (> 9.6)
https://gitlab.kitware.com/vtk/vtk/-/commit/675e97fa64a9563f6ec6f1fbf06aba84b2920ea8
Having a bit of trouble finding the right type conversions for Javascript bindings, but a review of what I have so far & feedback would be much appreciated!
Issue ticket number and link if any
Checklist for finalizing the PR
.github/workflows/versions.json, I have updateddocker_timestampAI Disclosure
Continuous integration
Please write a comment to run CI, eg:
\ci fast.See here for more info.