Hugo-Dz/spritefusion-pixel-snapper

A tool to snap pixels to a perfect grid. Designed to fix messy and inconsistent pixel art generated by AI.

What it solves

AI image models often struggle to create true grid-based pixel art, resulting in inconsistent pixel sizes, drifting grid resolution, and colors that aren't tied to a strict palette. Pixel Snapper fixes these issues by snapping pixels to a perfect grid and quantizing colors to a specific palette.

How it works

The tool processes images to ensure every pixel is aligned to a consistent grid. It can auto-detect pixel size or allow users to override it. Additionally, it constrains the output to a a strict, quantized color palette, which can be either automatically generated based on a color count or defined by the user via hex codes.

Who it’s for

  • AI artists creating pixel art that needs to be cleaned up for use in games.
  • Developers working with procedural 2D art, tilemaps, or isometric maps that don't fit a grid.
  • Game asset creators producing 2D game assets and 3D textures that need to be perfectly scalable.

Highlights

  • Grid Alignment: Snaps pixels to a perfect, consistent grid.
  • Color Quantization: Ties colors to a strict palette (default 16 colors) or a custom hex palette.
  • Pixel Size Control: Supports auto-detection of pixel size or manual override.
  • Batch Processing: The CLI tool allows for processing entire directories of images.
  • Cross-Platform: Available as a CLI tool (Rust/Cargo/Brew) and a WASM module for web integration.

Related

  • Project
  • Project
  • Project
  • Project
  • Project