[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-82403":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":15,"starSnapshotCount":15,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},82403,"spritefusion-pixel-snapper","Hugo-Dz\u002Fspritefusion-pixel-snapper","Hugo-Dz","A tool to snap pixels to a perfect grid. Designed to fix messy and inconsistent pixel art generated by AI.","https:\u002F\u002Fwww.spritefusion.com\u002Fpixel-snapper",null,"Rust",2088,112,9,0,14,63,64,42,28.16,"MIT License",false,"main",[25,26,27,28],"game-development","gamedev","image-processing","pixel-art","2026-06-12 02:04:25","# Sprite Fusion Pixel Snapper\n\n**Online version**: https:\u002F\u002Fspritefusion.com\u002Fpixel-snapper\n\nA tool to snap pixels to a perfect grid. Designed to fix messy and inconsistent pixel art generated by AI.\n\n\u003Cimg src=\".\u002Fstatic\u002Fhero.png\" alt=\"Pixel Snapper\" style=\"width: 100%; image-rendering: pixelated;\">\n\n## Why ?\n\n**Current AI image models can't understand grid-based pixel art.**\n\n- Pixel are inconsistent in size and position.\n- The grid resolution can drift over time.\n- Colors are not tied to a strict palette.\n\n**With Pixel Snapper:**\n\n- ✅ Pixel are snapped to a perfect grid.\n- ✅ The grid resolution is consistent and can be scaled to pixel resolution.\n- ✅ Colors are tied to a strict, quantized palette.\n\n## Perfect for\n\n- **AI generated pixel art** that needs to be snapped to a grid.\n- **Procedural 2D art that doesn't fit a grid** like tilemaps or isometric maps.\n- **2D game assets and 3D textures** that need to be perfectly scalable.\n\n\u003Cimg src=\".\u002Fstatic\u002Fdetails.png\" alt=\"Details\" style=\"width: 100%; image-rendering: pixelated;\">\n\n\u003Cp align=\"center\">\u003Cem>Pixel Snapper preserves as much details as possible like dithering.\u003C\u002Fem>\u003C\u002Fp>\n\n\u003Cbr>\n\n## Pixel Snapper comes in two flavors\n\nRequires [Rust](https:\u002F\u002Fwww.rust-lang.org\u002F) installed on your machine.\n\n### 💻 CLI\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FHugo-Dz\u002Fspritefusion-pixel-snapper.git\ncd spritefusion-pixel-snapper\n```\n\n```bash\ncargo run input.png output.png\n```\n\nThe command accepts an optional k-colors argument:\n\n```bash\ncargo run input.png output.png 16\n```\n\nUse a directory as the input path to process a batch.\n\n```bash\ncargo run sprites\u002Fbatch_inputs sprites\u002Fbatch_outputs 16\n```\n\nYou can also override the auto-detected pixel size with `--pixel-size`:\n\n```bash\ncargo run input.png output.png --pixel-size 8\ncargo run sprites\u002Fbatch_inputs sprites\u002Fbatch_outputs 16 --pixel-size 8\n```\n\nThis 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.\n\n### 🌐 Web (WASM)\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FHugo-Dz\u002Fspritefusion-pixel-snapper.git\ncd spritefusion-pixel-snapper\n```\n\nBuild the WASM module:\n\n```bash\nwasm-pack build --target web --out-dir pkg --release\n```\n\nThen use the WASM module in your project:\n\n```js\nimport init, { process_image } from \".\u002Fpkg\u002Fspritefusion_pixel_snapper.js\";\n\nawait init();\n\n\u002F\u002F process_image(inputBytes, kColors?, pixelSizeOverride?)\nconst outputBytes = process_image(inputBytes, 16);\n```\n\nPass `null` for any optional argument you want to leave on its default behavior.\n\n## Acknowledgments\n\nPixel Snapper is a [Sprite Fusion](https:\u002F\u002Fspritefusion.com) 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.\n\n\u003Cimg src=\".\u002Fstatic\u002Fspritefusion.webp\" alt=\"Sprite Fusion\" style=\"width: 100%;\">\n\n## License\n\nMIT License [Hugo Duprez](https:\u002F\u002Fwww.hugoduprez.com\u002F)\n","Sprite Fusion Pixel Snapper 是一款用于将像素对齐到完美网格的工具，旨在修复由AI生成的杂乱和不一致的像素艺术。其核心功能包括将像素精确对齐到网格、保持一致的网格分辨率以及将颜色限定在严格的量化调色板内。该项目使用Rust语言开发，提供命令行界面和WebAssembly版本，方便用户根据需求选择合适的使用方式。它非常适合处理需要对齐到网格的AI生成像素艺术、不符合网格要求的程序化2D艺术（如tilemap或等距地图）以及需要完全可缩放的2D游戏资源和3D纹理。",2,"2026-06-11 04:08:30","high_star"]