A tool to snap pixels to a perfect grid. Designed to fix messy and inconsistent pixel art generated by AI.
![]()
Current AI image models can't understand grid-based pixel art.
With Pixel Snapper:
![]()
Pixel Snapper preserves as much details as possible like dithering.
![]()
A standalone build of Pixel Snapper coming with these features:
Download the desktop application
Requires Rust installed on your machine.
git clone https://github.com/Hugo-Dz/spritefusion-pixel-snapper.git
cd spritefusion-pixel-snapper
cargo run input.png output.png
The command accepts an optional k-colors argument:
cargo run input.png output.png 16
Use a directory as the input path to process a batch.
cargo run sprites/batch_inputs sprites/batch_outputs 16
You can also override the auto-detected pixel size with --pixel-size:
cargo run input.png output.png --pixel-size 8
cargo run sprites/batch_inputs sprites/batch_outputs 16 --pixel-size 8
This is useful when the auto-detection doesn't match the expected grid size. The value must be between 1 and half the smallest image dimension.
git clone https://github.com/Hugo-Dz/spritefusion-pixel-snapper.git
cd spritefusion-pixel-snapper
Build the WASM module:
wasm-pack build --target web --out-dir pkg --release
Then use the WASM module in your project:
import init, { process_image } from "./pkg/spritefusion_pixel_snapper.js";
await init();
// process_image(inputBytes, kColors?, pixelSizeOverride?)
const outputBytes = process_image(inputBytes, 16);
Pass null for any optional argument you want to leave on its default behavior.
Pixel Snapper is a Sprite Fusion project. Sprite Fusion is a tool to generate TRUE pixel art sprites and animations for game development.
![]()
MIT License Hugo Duprez
$ claude mcp add spritefusion-pixel-snapper \
-- python -m otcore.mcp_server <graph>