Registry / ai-ml / pixeloe

pixeloe

JSON →
library0.1.4pypypiunverified

PixelOE is a Python library for detail-oriented image pixelization based on a contrast-aware outline expansion algorithm. It's designed to create pixel art-style images while preserving key details. The current version is 0.1.4, and the library appears to be actively maintained with releases as features and improvements are developed.

pip install pixeloe
INSTALL
IMPORT
SIG · PIXELOE
P
pixeloe
ai-mlpythonv0.1.4
Install
75.9s avg
Import
Disk
5094MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 80.75s
py 3.11
✕ build_error
✓ 77.3s
py 3.12
✕ build_error
✓ 73.05s
py 3.13
✕ build_error
✓ 72.5s
py 3.9
✕ build_error
✕ build_error
5094MB installed
● package 5094MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pixelize
from pixeloe_exp import pixelize
from pixeloe import pixelize

This quickstart loads an image (a dummy one created for the example), applies the `pixelize` function with common parameters, and saves the resulting pixelized image. The `pixelize` function takes a `PIL.Image` object as input and returns a new `PIL.Image` object.

from PIL import Image import pixeloe import os # Create a dummy image for demonstration img_path = "example_input.png" Image.new('RGB', (100, 100), color = 'red').save(img_path) # Load the image img = Image.open(img_path).convert("RGB") # Pixelize the image with specified parameters # pixels: size of pixelization blocks # contrast: contrast awareness level # outline: whether to include outlines # levels: number of color levels to quantize to out_img = pixeloe.pixelize(img, pixels=8, contrast=250, outline=True, levels=8) # Save the output image output_path = "pixelized_output.png" out_img.save(output_path) print(f"Original image saved to {img_path}") print(f"Pixelized image saved to {output_path}") # Clean up dummy image os.remove(img_path)
Debug
Known issues
gotchaPixelOE requires Python 3.10 or newer. Installing on older Python versions will fail or result in dependency issues.
fix
Ensure your Python environment is 3.10 or higher. Use `python --version` to check.
affects: <0.1.0
gotchaThe `pixelize` function exclusively expects a `PIL.Image` object as input. Passing NumPy arrays (common for OpenCV) or other image formats will lead to `AttributeError` or `TypeError`.
fix
Convert your image to a PIL Image first. E.g., for an OpenCV (NumPy) image: `pil_img = Image.fromarray(cv2.cvtColor(np_img, cv2.COLOR_BGR2RGB))`.
affects: All
gotchaProcessing very large images (e.g., several megapixels) can be slow and consume significant memory due to the detailed analysis performed by the algorithm. Consider downscaling images if performance is critical.
fix
For performance-critical applications, pre-process large images by resizing them to a smaller resolution using `PIL.Image.resize()` before passing them to `pixeloe.pixelize()`.
affects: All
Upgrade
Version history
0.1.4latest on PyPI · released Feb 16, 2025
Audit
Dependencies
numpyrequiredCore numerical operations for image processing.
opencv-pythonrequiredComputer vision functionalities.
scikit-imagerequiredImage processing algorithms.
scipyrequiredScientific computing, potentially for image filtering or transformations.
PillowrequiredImage loading, saving, and basic manipulation.
tqdmrequiredProgress bar for long-running operations.
Agent activity
16 hits · last 30 days
node
16
Resources