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.1.1.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.1-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spritegrid-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 26e8f07f8b599e3dc2af85e2691178ea0b45ae5f6d0977a4395fc6bb155ac957
MD5 3d3d4da260fcd8203064e3d8f4e394e7
BLAKE2b-256 91818af11f54d6350c2ff23b96bbf38767b2546fe7a1b4f7b58d332243a62af4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spritegrid-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff090e41bc2dc32cae2b44b725827412edf9dcd362006f686a988c59dfc0c666
MD5 f33c40d35e3c190380956e13f54c01c9
BLAKE2b-256 919ab83c983390f2abff06b32ab8985ca3c68fb17852af0800d5a0e1cba547bd

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