Repository navigation
Releases: ADJB1212/blanket
Release list
v0.0.5
Full Changelog: v0.0.4...v0.0.5
v0.0.4
v0.0.3
Blanket 0.0.3 adds drawing and text, image expressions, public color helpers, and runtime codec diagnostics. It also expands the Image API and improves native processing across image modes.
New features
- ImageDraw: Draw points, lines, rectangles, rounded rectangles, ellipses, arcs, chords, pieslices, and polygons. Includes optional antialiasing, translucent drawing on RGB images, bitmap drawing, and flood fill.
- Text drawing: Measure and draw single-line and multiline text with anchors, alignment, spacing, and strokes. A built-in bitmap font works without extra dependencies; compatible font objects, including explicitly supplied Pillow fonts, are also supported.
- ImageMath: Evaluate arithmetic, bitwise operations, comparisons, and conversions over single-band images with
lambda_eval()andunsafe_eval(). Pixel calculations run in Rust, with parallel execution for large images. - ImageColor: Use
getrgb()andgetcolor()to turn CSS color strings into RGB/RGBA tuples or mode-specific pixel values. - Runtime diagnostics: The new
featuresmodule providescheck(),version(),get_supported(), andblanketinfo()to inspect codec availability, backend versions, and HEIF encoder/decoder support. - More Image methods: Adds
show(),verify(),draft(),getim(),im,remap_palette(),tobitmap(), andeffect_spread().show()supports a custom viewer throughBLANKET_IMAGE_VIEWER.
Fixes and processing improvements
- Correct integer and floating-point conversions, including full-precision grayscale samples, 16-bit saturation and byte order, and independent output storage.
- Correct cropped scalar-image resizing and vertical reduction so intermediate results do not include unrelated rows or previous row sums.
- Improve neighborhood filtering across channels, large windows, image edges, and custom filter subclasses.
- Improve flood-fill coverage and drawing on independent images from multiple threads.
- Keep earlier winning PNG candidates during extended lossy-compression searches.
- Reduce metadata parsing allocations by skipping large pixel payloads in JPEG, PNG, and JPEG XL files.
- Expand portable SIMD kernels and parallel integer conversions; optimize packed-pixel operations, image math, resampling, filtering, and quantization.
Build and compatibility notes
- Source builds now require the nightly Rust toolchain pinned in
rust-toolchain.tomlfor portable SIMD. Native operations, codecs, and compression are split into focused workspace crates. - Update PyO3 to 0.30 and refresh native dependencies. Fix macOS linking by removing an unsupported linker flag.
- Drawing rasterization and the built-in font can differ from Pillow.
draft()is a compatibility no-op because decoding is eager;getim()andimexpose Blanket's native image object. ImageMath.unsafe_eval()and itseval()alias evaluate Python expressions and require trusted input. Preferlambda_eval()for callable expressions.
Installation
Requires Python 3.12+:
pip install --upgrade pyblanket==0.0.3Release assets include wheels for Linux x86_64 and ARM64 (glibc 2.39+), macOS 26+ on Apple Silicon, and a source distribution.
Full changelog: v0.0.2...v0.0.3
v0.0.2
Blanket 0.0.2 expands image-mode support beyond grayscale, RGB, RGBA, and indexed images, adding bilevel, alpha, integer, floating-point, and additional color modes.
New features
- Bilevel and alpha modes: Adds
1,LA, andPAimages, with mode-aware conversion, pixel access, and supported image operations. - Integer samples: Adds signed 32-bit
Iand unsigned 16-bitI;16,I;16L, andI;16Bmodes, including explicit byte-order handling. - Floating-point images: Adds
Fmode with pixel access, conversion, copying, cropping, transposition, resizing, transforms, and TIFF interchange. - Additional color modes: Adds
HSV,CMYK, andYCbCr, plus 8-bit CIELABwith native LittleCMS conversion between sRGB and D50 LAB. - Logical channel operations: Adds native bilevel logical operations in
ImageChops.
Fixes and processing improvements
- Match Pillow's CMYK and YCbCr conversion behavior.
- Optimize integer and floating-point conversions, parallel HSV conversion, pixel processing, nearest-neighbor mesh transforms, PNG encoding, and TIFF encoding.
- Enable system WebP linking by default for the Python extension and improve native dependency builds.
- Reorganize the Rust core into workspace crates for image storage, operations, codecs, and Python bindings.
Mode compatibility
- Operation support varies by mode. Integer modes and
Fsupport selected pixel and geometric operations; many processing operations still require conversion to an 8-bit mode. IndexedPandPAsupport remains limited. - CMYK uses raw channels without ICC color management. CMYK output supports JPEG, TIFF, and PDF; save-time compression optimization is unsupported.
- YCbCr output is limited to JPEG through RGB conversion. HSV images require conversion before saving.
FandLABoutput is limited to TIFF. LAB save-time compression optimization is unsupported.- Blanket remains alpha software with a subset of Pillow's API. Animation and multipage editing are unsupported.
Installation
Requires Python 3.12+:
pip install --upgrade pyblanket==0.0.2Release assets include wheels for Linux x86_64 and ARM64 (glibc 2.39+), macOS 26+ on Apple Silicon, and a source distribution. Linux ARM64 wheels are new in this release.
Full changelog: v0.0.1...v0.0.2
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