ImPixelate
This snippet of code attempts to pixelate images.
Usage
import cv2, os
import numpy as np
from imPixelate import pix
img_fullname = "assets/lotus.jpg"
img_name, img_ext = os.path.splitext(img_fullname)
img = cv2.imread(img_fullname)
img_out = img.copy()
[h, w, d] = img.shape
for i in range(d):
img_out[:, :, i] = pix(img[:, :, i].copy())
cv2.imwrite(f'{img_name}-pixelate{img_ext}', img_out)
Output
This is a sample image:
This is the sample image pixelated:
Metadata
Release files for imPixelate 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| imPixelate-0.0.2.tar.gz | 732.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| imPixelate-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 735.6 kB
Release files / imPixelate-0.0.2.tar.gz
| Download URL | imPixelate-0.0.2.tar.gz |
|---|---|
| Size | 732.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bfec338fa42c0068849fa752685c2e44cfa2fb50a8f389f8754f72db4476b749
|
|
BLAKE2b-256 checksum How to use checksums |
f5dfee1d61eb372dc61eb2cd5b5dd62fe5c723a664144085acec6e1bcb722ade
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.2
|
Release files / imPixelate-0.0.2-py3-none-any.whl
| Download URL | imPixelate-0.0.2-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62749047a2b97bfa80fd0745d8abd27defa571e58b7a8e73e9f81abe4f1990c9
|
|
BLAKE2b-256 checksum How to use checksums |
50bbe7e7275c63c01ebfd7021fb77ea99abbb8843a6d3f3e9f7d744d6ae99880
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.2
|