Crates.io | roucoule |
lib.rs | roucoule |
version | 0.1.0 |
source | src |
created_at | 2023-03-04 23:47:34.809133 |
updated_at | 2023-03-04 23:47:34.809133 |
description | Simple avatar generator |
homepage | |
repository | https://framagit.org/inkhey/roucoule |
max_upload_size | |
id | 800923 |
size | 1,615,409 |
An avatar generator optimised for generating random avatars based on multiple image layers, able to return same image from a string "slug". Heavily inspired by David Revoy's cat avatar generator and MonsterID by Andreas Gohr's.
This generator relies on the Image
crate to do image processing.
Roucoule is a Rust Re-implementation of Pioupiou Avatar Generator python Library. This version rely on image library.
WIP. This is a project to learn rust by practice, so it's not state of the art for now.
cargo build
./target/debug/roucoule roucoule roucoule.png
cat:
cargo build
./target/debug/roucoule roucoule roucoule.png -t "sample/cat_revoy" -l "body,fur,eyes,mouth,accessorie"
monster:
cargo build
./target/debug/roucoule roucoule monster.png -t "sample/monster_id" -l "legs,hair,arms,body,eyes,mouth" -w 120 -i 120
use roucoule::AvatarGenerator;
use std::path::PathBuf;
let av = AvatarGenerator{
output_path: PathBuf::from("test.png"),
theme_path: PathBuf::from("sample/bird_revoy/"),
layers: "tail,hoop,body,wing,eyes,bec,accessorie".to_string(),
width: 256,
height: 256
};
av.generate_avatar("test");