Skip to main content

A command line tool for turning AI-generated pixel art into real pixel art.

Project description

  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 git+https://github.com/marksverdhei/spritegrid.git

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spritegrid-0.1.0.tar.gz (4.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spritegrid-0.1.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file spritegrid-0.1.0.tar.gz.

File metadata

  • Download URL: spritegrid-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for spritegrid-0.1.0.tar.gz
Algorithm Hash digest
SHA256 07219e3796490c1f46683d90b72caa092d58f81c3eee5d70c3f8867cbe8c993b
MD5 dfa73616f20d7fa7683eb9bb0cb5608a
BLAKE2b-256 eb8ecd93823e740c38b12b6e80e94d44bb221bdff2634970b37e42e74fecdad1

See more details on using hashes here.

File details

Details for the file spritegrid-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: spritegrid-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for spritegrid-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e24e4a6dd82eeb523702f4236d884facdeb289bbbae347ad15c3820d4ebc8e69
MD5 02cad040b80d48ee4b1a4371399da434
BLAKE2b-256 b924301d4c2817d4c49c4832ad6eaa3f9b6412276c1d6894b779487124b2d0e0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page