Open fmarier opened 3 years ago
Sadly the only rust library I can find that supports writing webp is this one, which is actually a thin wrapper over google's libwebp
C library.
Which means it cannot be used from within a wasm
- and arguably defeats the point somewhat of having this image processing in rust.
Good find Graham. I guess we won't be able to implement the ideal workflow in a straightforward way.
Let's just remove webp from wasm-thumbnail entirely for now.
From @tackley:
The C library would be needed to write webp; reading webp is pure rust. See https://github.com/image-rs/image/blob/master/src/codecs/webp/decoder.rs.
The ideal workflow for users of this component is:
wasm-thumbnail
converts to WEBPso that we are guaranteed not to host the exact bytes that a user uploaded (i.e. we force a conversion between image formats).
At the moment, the Rust code will accept input images in any of the supported formats.