3 releases (breaking)
0.2.0 | May 27, 2024 |
---|---|
0.1.0 | May 25, 2024 |
0.0.1 | May 21, 2024 |
#307 in Images
494 downloads per month
1.5MB
6K
SLoC
mabel 🍁
Declarative pixel art 🎨
Sometime ago i found a really cute project called tep that generates images based on its own .tep
format! I had problems with it that prevented me from actually using it. Namely that you cannot control the scale of each "pixel".
Mabel uses the same approach to generate simple pixel images in a declarative, reproducible manner!
Installation
crates.io
cargo install mabel
Usage
Mabel uses the eno data language. Initially i was going to write my own format, but i found eno and a ready parser for it in rust. It is quiet similar to what i had planned, only better. You can learn more about eno here.
Name | Type | Required | Notes |
---|---|---|---|
size | u8 | No | The size of each pixel in the image. |
width | u32 | No | The amount of pixels in the x-axis. |
height | u32 | No | The amount of pixels in the y-axis. |
palette | Fieldset | No | The color palette. Keys are the characters and values are the color. Keys must be one character long. Colors can be anything that color-art supports. |
pixels | Multiline Field | Yes | The image data. Spaces and empty lines are transparent. Characters must be defined in palette . |
To see some examples, check out the examples directory.
mabel <input.eno> [-o output.png]
mabel -h
for more information.
Acknowledgements
License
Dependencies
~2.6–5MB
~69K SLoC