Crates.io | initials-revamped |
lib.rs | initials-revamped |
version | 0.1.2 |
source | src |
created_at | 2022-12-15 23:18:20.971108 |
updated_at | 2022-12-15 23:25:48.482226 |
description | initials avatar for rust |
homepage | https://github.com/ygormartins/initials-revamped.rs |
repository | https://github.com/ygormartins/initials-revamped.rs.git |
max_upload_size | |
id | 738357 |
size | 230,856 |
initials-revamped
is a fork from the initials
crate that allows generating customizable avatars with the initial characters from arbitrary name values.
initials
to initials-revamped
write_to
method to write raw bytes data to an arrayIn your Cargo.toml, add the following:
[dependencies]
initials_revamped = "*"
use initials_crate::{AvatarBuilder, AvatarResult};
fn avatar() -> AvatarResult {
AvatarBuilder::new("Avatar")
.with_font_color("#000000")?
.with_background_color("#FAFAFA")?
.with_width(200)?
.with_height(200)
}
fn main() {
let avatar = avatar().unwrap();
let image = avatar.draw();
// use the generated image
}
See Documentation (original docs - still haven't written my own)
MIT
All the credit goes to Onur Sönmez, the original creator of this awesome lib.