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

PhotonImage.new_from_blob(blob) throws error in Web Assembly #197

Open
fineshop opened this issue Dec 21, 2024 · 0 comments
Open

PhotonImage.new_from_blob(blob) throws error in Web Assembly #197

fineshop opened this issue Dec 21, 2024 · 0 comments

Comments

@fineshop
Copy link

fineshop commented Dec 21, 2024

Creating a new PhotonImage instance with blob using PhotonImage.new_from_blob(blob) throws unreachable error.

Error: unreachable

  957 |    */
  958 |   static new_from_blob(blob) {
> 959 |     const ret = wasm.photonimage_new_from_blob(addHeapObject(blob));
      | ^
  960 |     return _PhotonImage.__wrap(ret);
  961 |   }
  962 |   /**

I am not familiar with rust programming language.
It looks like PhotonImage.new_from_blob function is trying to create an Uint8Array instance directly from Blob, i.e. new Uint8Array(blob)

https://github.com/silvia-odwyer/photon/blob/941adf9d2a60f9b92a2b8016b5036033dbffb192/crate/src/lib.rs#L107C1-L115C6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant