mcbanner

Crates.iomcbanner
lib.rsmcbanner
version0.1.1
sourcesrc
created_at2024-02-23 19:35:46.930386
updated_at2024-02-23 19:41:52.091301
descriptionA simple library to generate Minecraft banner images.
homepage
repositoryhttps://github.com/Fudyy/mcbanner
max_upload_size
id1150939
size199,097
Carlos González (Fudyy)

documentation

README

MCBanner

A simple library to generate Minecraft banner images.

It uses the image under the hood for the image generation.

Usage

Add this to your Cargo.toml:

[dependencies]
mcbanner = "0.1.1"

Example

The Banner struct is the main entrypoint of the library.

use mcbanner::{Banner, Pattern, MCColor};

fn main() {
    let mut banner = Banner::new(MCColor::Lime);
    banner.add_pattern(Pattern::Creeper, MCColor::Black);
    banner.render();
    banner.save("banner.png").unwrap();
}

Running this example code gives you the next result:

License

This project is licensed under the MIT License - see the LICENSE file for details.

Commit count: 0

cargo fmt