Repository navigation
v0.0.4
Blanket 0.0.4 adds mutable drawing paths and CSS Color 4 parsing, updates behavior for Pillow 13, and improves pixel access and native image processing.
New features
- ImagePath: Create and edit coordinate paths, calculate bounds, compact nearby vertices, map coordinates, and apply affine transforms. Paths work directly with
ImageDrawmethods. - CSS Color 4: Parse modern color functions, including
hwb(),lab(),lch(),oklab(),oklch(), andcolor(), alongside modern RGB/HSL syntax. Wide-gamut colors are mapped to 8-bit sRGB for use withImageColorand drawing APIs.
Fixes and processing improvements
- Match Pillow 13's alpha-aware
resize()behavior when usingreducing_gap, and correct translucent string fill colors in resampled transforms. - Handle zero-sized images and outputs in
ImageOps.contain()andfit(). Validateposterize()bit counts from 1 through 8. - Improve raw palette decoding, palette color allocation, and palette cache updates.
- Preserve floating-point scalar operands in
ImageMathexpressions rather than converting them to integers. - Accelerate pixel access, conversions, extrema, drawing, filtering, resampling, channel arithmetic, and other native kernels with portable SIMD and parallel processing.
Build and compatibility notes
- CSS color parsing supports absolute colors and produces sRGB pixel values; it does not retain wide-gamut image data.
- Blanket remains alpha software with a subset of Pillow's API. Animation and multipage editing are unsupported.
- Source builds require the nightly Rust toolchain pinned in
rust-toolchain.toml. Improve macOS toolchain setup and native linking. - Linux wheels now target glibc 2.28+, expanding compatibility beyond the earlier glibc 2.39+ builds.
Installation
Requires Python 3.12+:
pip install --upgrade pyblanket==0.0.4Release assets include wheels for Linux x86_64 and ARM64 (glibc 2.28+), macOS 26+ on Apple Silicon, and a source distribution.
Full changelog: v0.0.3...v0.0.4