Sprite Fusion Pixel Snapper - Python Binding
A Python binding for Pixel Snapper by Hugo Duprez. Snap pixels to a perfect grid - designed to fix messy and inconsistent pixel art generated by AI.
Example
| Input | Output |
|---|---|
Installation
pip install pixel-snapper
Or build from source with maturin:
pip install maturin
maturin develop --features python
Usage
Library
from pixel_snapper import PixelSnapperConfig, process_image, process_file_cli
# Process image bytes
config = PixelSnapperConfig(k_colors=16, pixel_size_override=8)
output_bytes = process_image(input_bytes, config)
# Process file directly
process_file_cli("input.png", "output.png", config)
CLI
pixel-snapper input.png output.png
pixel-snapper input.png output.png 16
pixel-snapper input.png output.png --pixel-size 8
pixel-snapper sprites/batch_inputs sprites/batch_outputs 16
Batch processing with progress
from pixel_snapper import PixelSnapperConfig, process_batch
def on_event(event):
print(f"[{event['type']}] {event}")
config = PixelSnapperConfig(k_colors=16)
process_batch("input_dir", "output_dir", config, on_event)
Acknowledgments
This is a Python binding fork of spritefusion-pixel-snapper by Hugo Duprez. All credit for the original Rust implementation goes to the original authors.
License
MIT License - See LICENSE for details.
Metadata
Release files for pixel-snapper 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 9.5 MB
Release files / pixel_snapper-0.1.0-cp313-cp313-win_amd64.whl
| Download URL | pixel_snapper-0.1.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 479.1 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
aaba9235148cf464762502dc4e495cf8463dc4646f0838d0de08af43312c0c62
|
|
BLAKE2b-256 checksum How to use checksums |
a3cdea207489e5a1194cab7c3d6475a66ece74b8b7c2282320a28ee7925fd90c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logRelease files / pixel_snapper-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl
| Download URL | pixel_snapper-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 676.2 kB |
| Tags | CPython 3.13 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
47f66bd4e71244f6833c72844875552e5ef56468203f09c84ce5ecd5a9abaf9b
|
|
BLAKE2b-256 checksum How to use checksums |
ded100ebd6995f1d4225ba5ed33323f7b65aa0853dd3bde437decac2c7e66864
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logRelease files / pixel_snapper-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | pixel_snapper-0.1.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 590.5 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
463c5941594dafca10483b1df83b38143e74ab050fe915c86ba17d0498fad351
|
|
BLAKE2b-256 checksum How to use checksums |
c5c26810c548c847d2673d5733abd90e2b22ee29a58e6c79222078aa0497a6ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logRelease files / pixel_snapper-0.1.0-cp312-cp312-win_amd64.whl
| Download URL | pixel_snapper-0.1.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 479.1 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1b2362d78e6e58a33ab1bad33675ad386cdb087d4dbca1dccc9b7c1af15650b6
|
|
BLAKE2b-256 checksum How to use checksums |
3e7c362dba68741249b16808ca6e7c47fbeddbf110ac554211fd505c33950da7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logRelease files / pixel_snapper-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
| Download URL | pixel_snapper-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 676.4 kB |
| Tags | CPython 3.12 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
b7fe6c393f91a5281c073cd31f12a47cede654a4afa6b889ef3a52e3673319f7
|
|
BLAKE2b-256 checksum How to use checksums |
7898e9669fe00ecaeeaa3dcaaeaa8e1393ee293ad5d77af1ef4306cb06bffc46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logRelease files / pixel_snapper-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | pixel_snapper-0.1.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 590.7 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f519afe6152b8a6023fa4a4f9ca7cc6c8a4e3110d44aa2d416e3d46d0aadff5b
|
|
BLAKE2b-256 checksum How to use checksums |
4d6127a1ff7a32edd3a9ca7cf032fa93a784a5975157f289456f793c95ce7613
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logRelease files / pixel_snapper-0.1.0-cp311-cp311-win_amd64.whl
| Download URL | pixel_snapper-0.1.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 480.1 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6d4cb516c2d874bb1a2767a24ab706fbb6e7937ff9b495cd701d29c98b7a30c1
|
|
BLAKE2b-256 checksum How to use checksums |
6239b170c4aea6f37391ba0ce901b2486bcc26e6abb6b9e35772e18b837538cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logRelease files / pixel_snapper-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
| Download URL | pixel_snapper-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 676.0 kB |
| Tags | CPython 3.11 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
910f99eee8036414d613e6cfb3a91606a41c933222fed4cf6ccdce46a954776b
|
|
BLAKE2b-256 checksum How to use checksums |
2830d6d0ebaf1edcb95d9c906fedd4ac7db7fe0ee48ae18c2590e88c03605e83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logRelease files / pixel_snapper-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | pixel_snapper-0.1.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 590.9 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c6c3e6c810199829622e39f4be0aa071bc66722f60a70fb54e4d6fdca507520f
|
|
BLAKE2b-256 checksum How to use checksums |
f4aa11b743309796c85ce3821aea2038b9cb3e5cb01a51c5c3dabd4f23b27376
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logRelease files / pixel_snapper-0.1.0-cp310-cp310-win_amd64.whl
| Download URL | pixel_snapper-0.1.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 479.9 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0a59e486808745bca586cb662126d1d6492ccc474ab0e7914d23e0ad9b2e7bc0
|
|
BLAKE2b-256 checksum How to use checksums |
a0825f4d1d982472073257b588b8a243a07038907a311f1119566deea7b4da91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logRelease files / pixel_snapper-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl
| Download URL | pixel_snapper-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 676.0 kB |
| Tags | CPython 3.10 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
35d7088929dd2e06e1215cdf98baf8493d0e105a24b77612dbebf9fe45555ed8
|
|
BLAKE2b-256 checksum How to use checksums |
974eeb5a294158c801b659d1de6849e52b1d94ec1b878e5f13a2787f4dd27105
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logRelease files / pixel_snapper-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | pixel_snapper-0.1.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 591.4 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
81386dc722925075d640495ca23ba557f82a4e9fa7631315b034cced93701df8
|
|
BLAKE2b-256 checksum How to use checksums |
82de5bf965516f52aa7d8fe7f19de1d9be1462eaa85afb04de2c135c683465b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logRelease files / pixel_snapper-0.1.0-cp39-cp39-manylinux_2_34_x86_64.whl
| Download URL | pixel_snapper-0.1.0-cp39-cp39-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 676.5 kB |
| Tags | CPython 3.9 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
07d4c751ef1c0c0ee0f32212b2e56b5408c6d998c8653c9a0a6ecd3e221c4d69
|
|
BLAKE2b-256 checksum How to use checksums |
d0a39344132eb36d274c6d648771e1ef2987b7d80511c34dfc80fa5d5c8fb7c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logRelease files / pixel_snapper-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | pixel_snapper-0.1.0-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 591.8 kB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7c4dd6967b3f3d59061f947f14149320c034e78241f0605ae42db2aeb592bb7b
|
|
BLAKE2b-256 checksum How to use checksums |
b909be73e3368fe48cae21cacbd72cc94bb44e752a0319d529a0da61ed7d0b6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logRelease files / pixel_snapper-0.1.0-cp38-cp38-manylinux_2_34_x86_64.whl
| Download URL | pixel_snapper-0.1.0-cp38-cp38-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 677.0 kB |
| Tags | CPython 3.8 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
2643c8f036ea000d14f7debf3db3adb985b413e55c61fbdbb392bb8cbe14aae1
|
|
BLAKE2b-256 checksum How to use checksums |
7958085f20a6979a62f1edff00efd5e80590120ea40d5852bfc798421479abc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logRelease files / pixel_snapper-0.1.0-cp38-cp38-macosx_11_0_arm64.whl
| Download URL | pixel_snapper-0.1.0-cp38-cp38-macosx_11_0_arm64.whl |
|---|---|
| Size | 591.8 kB |
| Tags | CPython 3.8 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a21382e39a5ec9e6e638b2a210f1767a6871c5852e5954cbe0682d9bc2f6f66b
|
|
BLAKE2b-256 checksum How to use checksums |
e0e650c194774a4a4b357857894aecdd510d8cfcea327bab2fbede814984f3f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logSecurity for pixel-snapper 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 16 files in this release have been uploaded with provenance metadata.
Attestation for pixel_snapper-0.1.0-cp313-cp313-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.