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:
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
imPixelate-0.0.2.tar.gz
(732.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file imPixelate-0.0.2.tar.gz.
File metadata
- Download URL: imPixelate-0.0.2.tar.gz
- Upload date:
- Size: 732.8 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfec338fa42c0068849fa752685c2e44cfa2fb50a8f389f8754f72db4476b749
|
|
| MD5 |
9da7b8880641d797e40d0f48ca9f1ed0
|
|
| BLAKE2b-256 |
f5dfee1d61eb372dc61eb2cd5b5dd62fe5c723a664144085acec6e1bcb722ade
|
File details
Details for the file imPixelate-0.0.2-py3-none-any.whl.
File metadata
- Download URL: imPixelate-0.0.2-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62749047a2b97bfa80fd0745d8abd27defa571e58b7a8e73e9f81abe4f1990c9
|
|
| MD5 |
35419948821a338ca96a7c8740429ee1
|
|
| BLAKE2b-256 |
50bbe7e7275c63c01ebfd7021fb77ea99abbb8843a6d3f3e9f7d744d6ae99880
|