4 releases
0.1.5 | May 19, 2021 |
---|---|
0.1.3 | May 19, 2021 |
0.1.2 | May 19, 2021 |
0.1.1 | May 19, 2021 |
#1787 in Encoding
7KB
107 lines
rust_hash_avatar
rust编写的hash头像生成库
use hash_avatar::Generator;
fn main() {
Generator::new()
.create()
.save_to_png("fractal.png")
.unwrap();
Generator::new()
.set_img_size(250)
.set_padding(10)
.set_block_num(8)
.create()
.save_to_png("fractal2.png")
.unwrap();
}
运行Example
git pull https://github.com/t924417424/rust_hash_avatar.git master
cd rsut_hash_avatar
cargo run --example test
生成结果
Dependencies
~5MB
~65K SLoC