17 releases
0.11.11 | Oct 17, 2024 |
---|---|
0.11.9 | Jul 25, 2024 |
0.11.5 | Mar 14, 2024 |
0.11.3 | Sep 21, 2023 |
0.6.3 |
|
#551 in Images
340,133 downloads per month
Used in 74 crates
(11 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