roucoule

Crates.ioroucoule
lib.rsroucoule
version0.1.0
sourcesrc
created_at2023-03-04 23:47:34.809133
updated_at2023-03-04 23:47:34.809133
descriptionSimple avatar generator
homepage
repositoryhttps://framagit.org/inkhey/roucoule
max_upload_size
id800923
size1,615,409
(inkhey)

documentation

README

Roucoule

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.

Command-line usage:

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

Lib Usage

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");
Commit count: 0

cargo fmt