Repository navigation
v0.0.1
The first release of Blanket, a Rust-backed image library with a Pillow-shaped Python API and no external Python runtime dependencies.
Features
- Image processing: Create, open, convert, crop, resize, rotate, transpose, and save images. Includes all six
Image.Resamplingfilters, channel access, palette handling, quantization, and dithering. - ImageOps: Fit, contain, pad, flip, mirror, adjust colors, and correct EXIF orientation.
- Compositing and analysis: Paste with masks, blend images, alpha-composite overlays, perform channel arithmetic with
ImageChops, and calculate per-band statistics withImageStat. - Enhancement and filtering: Adjust brightness, contrast, color, and sharpness; apply blur, convolution, rank filters, and 3D color LUTs.
- Formats: Read and write PNG, JPEG, JPEG XL, TIFF, WebP, AVIF, HEIC/HEIF, BMP, GIF, and ICO. Export single-page PDFs with transparency.
- High-bit-depth workflows: Retain 10-, 12-, and 16-bit samples in supported formats and selected operations, with explicit conversion to 8-bit processing.
- Save-time compression:
LosslessImageCompressorsearches PNG, JPEG, JPEG XL, and HEIF/HEIC encodings without adding loss relative to the requested save.LossyImageCompressorsearches for smaller output within a configurable decoded RGB error limit, preserving alpha. - Interoperability: Work with binary streams, construct images from bytes or array-interface objects, and explicitly convert to Pillow with
to_pillow()when Pillow is installed. - Native execution: Pixel kernels use Rust, SIMD, and parallel processing for supported operations.
Scope and limitations
This alpha release focuses on L, RGB, and RGBA images, with limited indexed P support. It implements a subset of Pillow's API.
Animation and multipage editing are unsupported. Saving writes pixels without preserving source metadata. High-bit-depth support varies by operation and format; most processing requires 8-bit samples. Compression optimization applies to the requested save rather than recovering the original encoded file.
Installation
Requires Python 3.12+:
pip install pyblanket==0.0.1Release assets include wheels for Linux x86_64 (glibc 2.39+) and macOS 26+ on Apple Silicon, plus a source distribution.
Source: v0.0.1