I have the following problem. I have an https://docs.rs/stdweb/0.4.20/stdweb/web/html_element/struct.ImageElement.html
I want to take this ImageElement, convert it to a
Vec<u8> of (width * height * [r,g,b,a]), do some processing, convert the
Vec<u8> back to ImageElement.
This seems surprisingly messy.
Rust solutions shows something like this: https://stackoverflow.com/questions/46894766/accessing-uint8clampedarray-in-rust-web-assembly#50849229 (wtf, wasm32 ffi?)
JS solutions involve "ImageElement -> draw to Canvas -> get ImageData -> manip -> redraw to Canvas -> convert to DataURL -> construct ImageElement"
Is there an easier way to handle this?