pixeloe
Detail-Oriented Pixelization based on Contrast-Aware Outline Expansion.
What it is and what it does
PixelOE is a Python library that transforms photographs and high-resolution images into pixel art using classical image processing rather than machine learning. It works by first expanding the outlines of important visual features based on local contrast, then intelligently downsampling the result to a target resolution. The library offers both a legacy numpy-based API and a modern PyTorch implementation; the torch version supports GPU acceleration and can run CPU-only if needed.
The package provides three interfaces: a Python API for direct integration, a command-line tool for batch processing, and a ComfyUI custom node for integration into node-based workflows. It includes multiple downsampling modes (center, contrast, k-centroid, bicubic, nearest) and optional color palette quantization for classic pixel art aesthetics. The contrast-aware approach preserves fine details and sharp edges that naive downsampling would lose.
Use it for:
- Convert photographs into retro-style pixel art for game assets or artistic projects without training neural networks.
- Batch process image collections via CLI to generate consistent pixel art with configurable detail levels and color palettes.
- Integrate pixelization into ComfyUI workflows as a post-processing or artistic effect node alongside other image operations.
- Preserve fine details in downsampled images for thumbnail generation or low-resolution display while maintaining visual clarity.
- Apply outline expansion alone to improve existing pixelization methods, including neural network-based approaches.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts standard images into pixel art using contrast-aware outline expansion and intelligent downsampling, without requiring neural networks or AI models.
Yes, with conditions. Install if you need deterministic, parameter-tunable pixel art generation without AI overhead and can accept the five-dependency footprint (especially torch). The active maintenance, permissive license, and no known vulnerabilities support adoption. Skip if you want a lightweight solution or prefer neural network-based pixelization; the high install friction and torch dependency are real costs for simpler use cases.
Install
pixeloe on PyPI
pip
pip install pixeloeuv
uv add pixeloepoetry
poetry add pixeloeInstalling pixeloe
Before you install
High install friction due to five runtime dependencies (opencv-python, numpy, pillow, torch, kornia), though the package supports GPU-free operation for core logic. Maintenance is active with recent commits and steady releases.
License in practice
Apache License 2.0 is permissive, allowing commercial and private use with minimal restrictions; attribution required but no copyleft obligations.
Quickstart
pip install pixeloe
import torch
from pixeloe.torch.pixelize import pixelize
from pixeloe.torch.utils import to_numpy, pre_resize
img = pre_resize(img, target_size=256, patch_size=4).cuda().half()
result = pixelize(img, pixel_size=4, thickness=3)
result_img = to_numpy(result)[0]
Requires Python >=3.10; torch and kornia add substantial disk/memory overhead; GPU optional but recommended for performance.
Verify before relying
- Whether the legacy numpy/cv2 API remains stable or will be removed as indicated by deprecation notice.
- Actual performance on hardware other than RTX4090 and whether performance claims apply to typical consumer GPUs.
- Whether kornia is used in the core torch implementation or only in optional utilities.
- Input format requirements and supported image types beyond the webp examples shown.
Package facts
| License | Apache License 2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | high — source build required |
| Runtime dependencies | 5 — opencv-python, numpy, pillow, torch, kornia |
| Maintenance | actively maintained — 544 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 96,866/month — #13,191 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pixeloe-0.1.4.tar.gz
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
color-operationsApplies color-oriented image operations—gamma…
permissive · top 15,000 on PyPI
rich-pixelsRenders pixel images and ASCII art grids to the…
unclear · top 15,000 on PyPI
epaper-ditheringConverts images to dithered output optimized…
permissive · top 15,000 on PyPI
fill-voidsFills interior voids in 2D and 3D binary images…
copyleft · top 15,000 on PyPI
pixelhogCompares PNG screenshots pixel-by-pixel and…
permissive · top 5,000 on PyPI
cuvs-cu12Provides GPU-accelerated approximate nearest…
permissive · top 15,000 on PyPI
colorthiefExtracts dominant colors and color palettes…
permissive · top 15,000 on PyPI
vtracerConverts raster images (JPG, PNG) into vector…
permissive · top 15,000 on PyPI
climageConverts images to ANSI escape code sequences…
permissive · top 15,000 on PyPI
tsdownsampleDownsamples large time series datasets to a…
permissive · top 15,000 on PyPI