9 releases
0.11.3 | Sep 21, 2023 |
---|---|
0.11.2 | May 9, 2023 |
0.11.1 | Jan 24, 2023 |
0.11.0 | Dec 11, 2022 |
0.6.3 |
|
#475 in Images
11,887 downloads per month
Used in 7 crates
(6 directly)
37KB
659 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
~14MB
~347K SLoC