How to fix AI-generated pixel art
Pixel Snapper converts blurry, off-grid AI pixel art into clean, grid-aligned pixel art by quantizing colors, detecting edge profiles, walking cuts, and resampling.
Join
Open Source
How to Fix AI-Generated Pixel Art
Convert AI pixel art into clean, grid-aligned pixel art while preserving the original shapes and details.
Source code 2.3k
Try online
From AI mixels to a clean pixel art
AI image models often produce blurry, inconsistent, off-grid pixels. Pixel Snapper finds the underlying grid and rebuilds the image on a consistent pixel grid.
- Quantize colors
Original image
Read the color of every source pixel
↓ →
K-means palette
Find representative colors
↓ →
Quantized colors
Build a limited, consistent palette
- Edge profiles
X/Y brightness profile
Measure the strength of each brightness change
↓ →
Estimated step size
Find the median gap between peaks
- Walk cuts
Median step guide
Set the expected distance between cuts
↓ →
Walked cuts
Follow the strongest nearby edge peaks
- Resampling
Final cut cells
Use each cell as a color voting area
↓ →
Output pixels
Keep the winning color from each cell
Result
Input
Blurry, inconsistent, off-grid pixels
↓ →
Output
Clean, grid-aligned pixel art
Source code 2.3k
Try online
Making a game? Try our Pixel Art Generator
Create pixel art now
Fast Integration with Game Engines