2 个稳定版本
使用旧的 Rust 2015
1.16.1 | 2022年1月6日 |
---|---|
1.16.0 | 2022年1月5日 |
626 在 图像
43 每月下载次数
用于 hotline-rs
130KB
4K SLoC
概述
stb_image_write_rust 是 stb_image_write.h 的 Rust 版本,这是一个可以将图像保存为 BMP、JPG、PNG 和 TGA 格式的库
crate
https://crates.io/crates/stb_image_write_rust
示例代码
use stb_image_write_rust::ImageWriter::ImageWriter;
fn main() {
let mut writer = ImageWriter::new("output.jpg");
writer.write_jpg(width, height, components, image_data, 90);
}