16个版本
0.11.10 | 2024年8月8日 |
---|---|
0.11.9 | 2024年7月25日 |
0.11.7 | 2024年6月16日 |
0.11.5 | 2024年3月14日 |
0.6.3 |
|
#518 in 图像
每月235,616次下载
用于23个crate(直接使用7个)
38KB
670 行
ravif
— 用于AVIF图像编码的纯Rust库
AVIF图像编码器。基于rav1e和avif-serialize。
API仅通过调用单个encode_rgba
函数来输出AVIF图像。
此库为cavif
编码器提供动力。它针对静态图像进行了专门的编码配置,并且比标准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);
依赖项
~13MB
~328K SLoC