This snippet of code attempts to pixelate images.
Project description
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:
Project details
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for imPixelate-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62749047a2b97bfa80fd0745d8abd27defa571e58b7a8e73e9f81abe4f1990c9 |
|
MD5 | 35419948821a338ca96a7c8740429ee1 |
|
BLAKE2b-256 | 50bbe7e7275c63c01ebfd7021fb77ea99abbb8843a6d3f3e9f7d744d6ae99880 |