#image-generation #identicon #image #avatar #graphics

identicon-rs

identicon-rs is a library built around custom generation of identicon images

30 stable releases (6 major)

6.0.1 Nov 28, 2024
5.0.1 Jul 25, 2024
5.0.0 Mar 12, 2024
4.0.3 Jan 30, 2024
0.2.2 Feb 21, 2019

#64 in Images

Download history 650/week @ 2024-08-18 482/week @ 2024-08-25 647/week @ 2024-09-01 228/week @ 2024-09-08 219/week @ 2024-09-15 384/week @ 2024-09-22 507/week @ 2024-09-29 527/week @ 2024-10-06 463/week @ 2024-10-13 315/week @ 2024-10-20 585/week @ 2024-10-27 430/week @ 2024-11-03 530/week @ 2024-11-10 613/week @ 2024-11-17 436/week @ 2024-11-24 475/week @ 2024-12-01

2,071 downloads per month
Used in saasbase

MIT/Apache

35KB
729 lines

Identicon-rs

Rust dependency status Crates.io Documentation

This is an Identicon implementation in rust.

Documentation

Example

use identicon_rs::error::IdenticonError;
use identicon_rs::Identicon;

fn main() -> Result<(), IdenticonError> {
    let conways_glider = String::from("conways-glider");
    let test_string = "identicon_rs";

    // stored example
    let identicon_conways_glider = Identicon::new(&conways_glider);
    identicon_conways_glider.save_image("output_1.png")?;

    // chained example with no border
    Identicon::new(test_string)
        .set_border(0)
        .save_image("output_2.png")?;
    Ok(())
}

You can run this example with cargo run --example main.

The repository contains an example webservice that you can run with cargo run --example webserver.

You will obtain images analogous to the following ones:

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~4.5MB
~79K SLoC