README
This is a tiny image processing library to convert your images to Voronoi mosaic or Warhol effect images. We used k-means clustering algorithms to determine the position of Voronoi sites and pixel groups of Warhol effect.
How to use
pip install imgrit
The library depends on Pillow, NumPy, and SciPy.
If you have scikit-learn, the library uses the faster k-means. You can install it together with pip install "imgrit[sklearn]".
The following is the input image.
from PIL import Image
import imgrit
my_image = Image.open("../images/original.jpg")
voronoi_mosaic = imgrit.voronoi_mosaic(my_image, 250)
voronoi_mosaic.save("voronoi-mosaic.png")
warhol_effect = imgrit.warhol_effect(my_image, 10)
warhol_effect.save("warhol-effect.png")
OpenSea
If you'd like to see more images, please visit Asakura Gallery Digital at OpenSea.
Citations
under preparation.
Release files for imgrit 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| imgrit-0.2.1.tar.gz | 178.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| imgrit-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 187.0 kB
Release files / imgrit-0.2.1.tar.gz
| Download URL | imgrit-0.2.1.tar.gz |
|---|---|
| Size | 178.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5355249b172ac596a2a6067f721db68ccc85adb6caf872923c85119ee223d1f6
|
|
BLAKE2b-256 checksum How to use checksums |
73edb4ce8ff67901adcb75f1ad0a70e084d67bea89665744a75d605b6d5b6d3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 24, 2026.
Transparency logRelease files / imgrit-0.2.1-py3-none-any.whl
| Download URL | imgrit-0.2.1-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0f0498a90048c878054b8412de0aa2d25a337ff325c9324cb9d7def54102890
|
|
BLAKE2b-256 checksum How to use checksums |
ad286844b8767e0afa5210ea9ee6b48de2954a5890c5f7a4451716671594a678
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 24, 2026.
Transparency log