-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
Add heif_items API to emscripten #1462
base: master
Are you sure you want to change the base?
Conversation
Sure, would be good to increase the coverage of the JS wrapper. |
Main hurdle might be that we do not do any encoding and writing of HEIFs in JS yet. You cannot add items to existing files (yet), even in the C API. |
That's fine, I'm mostly interested in reading & decoding. |
Half the emscripten functions have the js prefix and the other half don't. It would be nice if there was a more consistent naming convention, but this might be a breaking change. Any thoughts? |
Yes. I think originally every function that required an explicit JS wrapper got the The convention could be: use the original name when the function is the equivalent of the original function, even if they required a wrapper. Functions that are JavaScript specific (e.g. |
For |
alloca() is faster because it allocates memory on the stack instead of the heap. The memory is also deallocated when the function ends, which removes the need to call free()
The PR now:
|
I would like add the heif_items.h API so JavaScript application can leverage that functionality.
I'm still trying to compile libheif to JavaScript/WASM so I can't test out the code yet, but I wanted some initial feedback on this task.