maroontree
Still images AV1 and AV2 AVIFs encoder in Rust.
Example
License
This project is licensed under either of
at your option.
Still images AV1 and AV2 AVIFs encoder in Rust.
fn main() {
let img = image::open("./assets/image.png")
.unwrap()
.to_rgba8();
let arr = img.to_vec();
let out = encode_rgb8(
&img.to_vec(),
img.width(),
img.height(),
&EncodeConfig::new()
.with_quality(60)
.with_cicp(ColorEncoding::srgb_ycbcr())
.with_chroma(ChromaFormat::Yuv444),
)
.unwrap();
std::fs::write("output.heic", &data).expect("failed to write output");
}
This project is licensed under either of
at your option.