Spritegrid is an image postprocessor for generative art. When general image generation models attempt to make pixel art, they often generate high-resolution images with janky pixels and grainy pixel colors.
- Pixels can be janky and pixels can be incorrectly aligned (half-pixels etc).
- Pixels are grainy and don't contain a single color. spritegrid divides
Spritegrid converts these images into a grid and generates the pixel art in its appropriate resolution:
As you can see, it works but it is not yet flawless. If you would like to contribute, hurry before I add some lame contribution guidelines!
pip install spritegrid
Basic
spritegrid assets/examples/centurion.png -o centurion.png
With background removal
spritegrid assets/examples/centurion.png -b -o centurion.png
You can resize the image afterwards with, e.g. imagemagick
convert pixel-art.png -filter point -resize 400% pixel-art-large.png