Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

spritefusion-pixel-snapper

> 编程语言
Open source

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

2.7K stars0 likes2 views
WebsiteGitHub

About

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

Sprite Fusion Pixel Snapper

  • Online version: https://spritefusion.com/pixel-snapper
  • Desktop version: https://www.spritefusion.com/pixel-snapper#desktop-edition

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

Why ?

Current AI image models can't understand grid-based pixel art.

  • Pixel are inconsistent in size and position.
  • The grid resolution can drift over time.
  • Colors are not tied to a strict palette.

With Pixel Snapper:

  • ✅ Pixel are snapped to a perfect grid.
  • ✅ The grid resolution is consistent and can be scaled to pixel resolution.
  • ✅ Colors are tied to a strict, quantized palette. You can also use a custom palette.

Perfect for

  • AI generated pixel art that needs to be snapped to a grid.
  • Procedural 2D art that doesn't fit a grid like tilemaps or isometric maps.
  • 2D game assets and 3D textures that need to be perfectly scalable.

Pixel Snapper preserves as much details as possible like dithering.


CLI

Brew

bash
brew install Hugo-Dz/tap/spritefusion-pixel-snapper

Cargo

Installation with Cargo requires Rust. Once installed, the CLI runs as a standalone native binary.

bash
cargo install spritefusion-pixel-snapper

Usage

spritefusion-pixel-snapper <INPUT> <OUTPUT> [COLOR_COUNT] [OPTIONS]
  • <INPUT>: A PNG/JPEG image, or a directory for batch processing.
  • <OUTPUT>: An output PNG, or a different output directory for a batch.
  • [COLOR_COUNT]: Number of palette colors. Defaults to 16.
  • --pixel-size <PIXELS>: Overrides the auto-detected pixel size. The value must be between 1 and half the smallest image dimension.
  • --palette <HEX,...>: Constrains the output to comma-separated six-digit hex colors.

Examples:

…

Run spritefusion-pixel-snapper --help to see every option.

Build from source

bash
git clone https://github.com/Hugo-Dz/spritefusion-pixel-snapper.git
cd spritefusion-pixel-snapper
cargo build --release

The binary will be available at target/release/spritefusion-pixel-snapper.

Web (WASM)

bash
git clone https://github.com/Hugo-Dz/spritefusion-pixel-snapper.git
cd spritefusion-pixel-snapper

Build the WASM module:

bash
wasm-pack build --target web --out-dir pkg --release

Then use the WASM module in your project:

javascript
import init, { process_image } from "./pkg/spritefusion_pixel_snapper.js";

await init();

// process_image(inputBytes, kColors?, pixelSizeOverride?, paletteHex?)
const outputBytes = process_image(inputBytes, 16);

// With a custom palette
const recoloredBytes = process_image(inputBytes, null, null, "0f0f1b,ffecd6,ff4d6d,29adff");

Pass null for any optional argument you want to leave on its default behavior.

Acknowledgments

Pixel Snapper is a Sprite Fusion project. Sprite Fusion is a tool to generate TRUE pixel art sprites and animations for game development.

License

MIT License Hugo Duprez

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustgame-developmentgamedevimage-processingpixel-art

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言