mcbanner 0.1.1

A simple library to generate Minecraft banner images.
Documentation
  • Coverage
  • 6.9%
    4 out of 58 items documented1 out of 1 items with examples
  • Size
  • Source code size: 199.09 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 617.03 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 36s Average build duration of successful builds.
  • all releases: 36s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Fudyy/mcbanner
    3 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Fudyy

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.