16 releases
0.11.10 | Aug 8, 2024 |
---|---|
0.11.9 | Jul 25, 2024 |
0.11.7 | Jun 16, 2024 |
0.11.5 | Mar 14, 2024 |
0.6.3 |
|
#402 in Images
270,128 downloads per month
Used in 31 crates
(10 directly)
38KB
670 lines
ravif
— Pure Rust library for AVIF image encoding
Encoder for AVIF images. Based on rav1e and avif-serialize.
The API is just a single encode_rgba
function call that spits an AVIF image.
This library powers cavif
encoder. It has encoding configuration specifically tuned for still images, and gives better quality/performance than stock rav1e.
lib.rs
:
use ravif::*;
let res = Encoder::new()
.with_quality(70.)
.with_speed(4)
.encode_rgba(Img::new(pixels, width, height))?;
std::fs::write("hello.avif", res.avif_file);
Dependencies
~13MB
~327K SLoC