Skip to content

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

License

Notifications You must be signed in to change notification settings

Hugo-Dz/spritefusion-pixel-snapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sprite Fusion Pixel Snapper

Online version: https://spritefusion.com/pixel-snapper

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

Pixel Snapper

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.

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.

Details

Pixel Snapper preserves as much details as possible like dithering.


Pixel Snapper comes in two flavors

Requires Rust installed on your machine.

💻 CLI

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

🌐 Web (WASM)

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.

Acknowledgments

Pixel Snapper is a Sprite Fusion project. Sprite Fusion is a free, web-based tilemap editor for game developers supporting a wide range of engines including Unity, Godot, Defold, and GB Studio.

Sprite Fusion

License

MIT License Hugo Duprez

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages