What does HackerNews think of image?

Encoding and decoding images in Rust

Language: Rust

#159 in Hacktoberfest
#93 in Rust
FTR there is a WebP decoder implementation in safe Rust in the image crate: https://github.com/image-rs/image

It used to be quite incomplete for a long time, but work last year has implemented many webp features. Chromium now has a policy of allowing the use of Rust dependencies, so maybe Chromium could start adopting it?

Side note the image-rs crate in the Rust ecosystem has no external dependencies and can encode and decode animated gifs and a variety of other image formats, 100% rust https://github.com/image-rs/image. At my startup we use this in a lambda to process user-uploaded images, with great success.
I wonder how these libraries compare to using something like image-rs [0] w/ a custom-exported C FFI extern? I have used that library's PNG decoder/encoder in WASM and it seems simple and small and fast. I think it'd be worthy to include in the next bench round since it's only a bit of glue code away from a "C library" too.

0 - https://github.com/image-rs/image

> Actix-web in used in production at Cloudflare for the image resizing feature.

Oh, that's really interesting. I actually used it for exactly the same purpose, but I was a bit disappointed by the image[1] crate for the image-resizing itself: it was several times slower than imagemagick (it was less the case on my decktop, when compiled with `target-cpu=native`, but on my low-end server many SIMD instructions weren't available and auto-vectorized code wasn't that efficient) and the image quality was also way poorer. Did you use that crate for the image processing ? Or imagemagick ? Or something you wrote internally ?

[1]: https://github.com/image-rs/image