| Crates.io | mcbanner |
| lib.rs | mcbanner |
| version | 0.1.1 |
| created_at | 2024-02-23 19:35:46.930386+00 |
| updated_at | 2024-02-23 19:41:52.091301+00 |
| description | A simple library to generate Minecraft banner images. |
| homepage | |
| repository | https://github.com/Fudyy/mcbanner |
| max_upload_size | |
| id | 1150939 |
| size | 199,097 |
A simple library to generate Minecraft banner images.
It uses the image under the hood for the image generation.
Add this to your Cargo.toml:
[dependencies]
mcbanner = "0.1.1"
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:
This project is licensed under the MIT License - see the LICENSE file for details.