Skip to content

marksverdhei/spritegrid

Repository files navigation

  spritegrid

spritegrid

License: MIT

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.

example showing janky and grainy pixels

  1. Pixels can be janky and pixels can be incorrectly aligned (half-pixels etc).
  2. 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:

comparison before and after postprocessing

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!


Installation

pip install spritegrid

Usage

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

About

Correction of AI generated pixel art by applying grid sampling.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages