hash_avatar

Crates.iohash_avatar
lib.rshash_avatar
version0.1.5
sourcesrc
created_at2021-05-19 01:23:20.178567
updated_at2021-05-19 01:45:35.598301
descriptionrust生成随机头像的库
homepagehttps://github.com/t924417424/rust_hash_avatar
repositoryhttps://github.com/t924417424/rust_hash_avatar
max_upload_size
id399247
size21,877
OldCat (t924417424)

documentation

README

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

生成结果

测试1 测试2

Commit count: 17

cargo fmt