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 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

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.2.0.tar.gz (6.5 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.2.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for spritegrid-0.2.0.tar.gz
Algorithm Hash digest
SHA256 da99e2160485f6eef74e683cde3f2ce1f881ae7438283c6d0394f7edc27689df
MD5 77e80bf96e63eb28cdffe37f96d00fe7
BLAKE2b-256 08a27317953f1ef78b9fd1aac849198bdf250412c43fdf773b4ad31697ede9b2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spritegrid-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.2 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e9d7d1026be69aa6fa99ae86f22f07d417ee6ada4c444b6e1ba5d4263ce123e
MD5 398e24f7cbc51fe8ec8c23db74d49d21
BLAKE2b-256 017a5f0885cc095c4ea9ae628eac873213a28c3f1a8d2ea1526b1a471a9ad22f

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