3 releases
Uses old Rust 2015
0.1.2 | Dec 15, 2022 |
---|---|
0.1.1 | Dec 15, 2022 |
0.1.0 | Dec 15, 2022 |
#876 in Images
115KB
317 lines
initials-revamped
initials-revamped
is a fork from the initials
crate that allows generating customizable avatars with the initial characters from arbitrary name values.
Fork To-Do List
-
Change lib path frominitials
toinitials-revamped
-
Submit crate to crates.io -
Use a more readable, fitting font (Roboto) -
Add support for directly using font bytes content (as opposed to paths) -
Update documention to include new features & change outdated info -
Better integration with the image crate -
Add awrite_to
method to write raw bytes data to an array
Setup and Usage
In 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)
Local Server
License
MIT
Credits
All the credit goes to Onur Sönmez, the original creator of this awesome lib.
Dependencies
~6.5MB
~89K SLoC