Hugo-Dz / spritefusion-pixel-snapper
git clone https://github.com/Hugo-Dz/spritefusion-pixel-snapper.git
A tool to snap pixels to a perfect grid. Designed to fix messy and inconsistent pixel art generated by AI.
+9
stars, 24h · #3,796
+~75
stars, 7 days · #2,809
+~320
stars, 30 days · #2,559
3.3k
★ total · +2% this week
210
forks · 0 open issues
Star history (as recorded here)
LanguageRust
LicenseMIT
Created2025-11-24 (11mo ago)
Last push3d ago
Watchers9
OwnerUser
GitHub topics
Links
- GitHub: github.com/Hugo-Dz/spritefusion-pixel-snapper
- Homepage: https://www.spritefusion.com/pixel-snapper
- Releases · Issues · Hacker News mentions
README excerpt
# 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 [code] ### Cargo Installation with Cargo requires Rust. Once installed, the CLI runs as a standalone native binary. [code] ### Usage [code] - ` `: A PNG/JPEG image, or a directory for batch processing. - ` `: An output PNG, or a different output directory for a batch. - `[COLOR_COUNT]`: Number of palette colors. Defaults to `16`. - `--pixel-size `: Overrides the auto-detected pixel size. The value must be between 1 and half the smallest image dimension. - `--palette `: Constrains the output to comma-separated six-digit hex colors. Examples: [code] Run `spritefusion-pixel-snapper --help` to see every option. ### Build from source [code] The binary will be available at `target/release/spritefusion-pixel-snapper`. ## 🌐 Web (WASM) [code] Build the WASM module: [code] Then use the WASM module in your project: [code] 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. ## Other open source pixel art tools **Sprite Fusion Sprite Normals**: generate normal maps for pixel art sprites and animations, so they react to dynamic lighting. - **Online version**: https://www.spritefusion.com/sprite-normals - **Repo**: https://github.com/Hugo-Dz/spritefusion-sprite-normals - **API**: https://www.spritefusion.com/docs/pixel-art-generator/api/generate-and-transform-images#normal-maps - **MCP**: https://www.spritefusion.com/docs/pixel-art-generator/api/mcp ## License MIT License Hugo Duprez