Skip to content

v0.0.4

Choose a tag to compare

@github-actions github-actions released this 17 Oct 16:51
· 54 commits to main since this release
30f4a8d

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 ImageDraw methods.
  • CSS Color 4: Parse modern color functions, including hwb(), lab(), lch(), oklab(), oklch(), and color(), alongside modern RGB/HSL syntax. Wide-gamut colors are mapped to 8-bit sRGB for use with ImageColor and drawing APIs.

Fixes and processing improvements

  • Match Pillow 13's alpha-aware resize() behavior when using reducing_gap, and correct translucent string fill colors in resampled transforms.
  • Handle zero-sized images and outputs in ImageOps.contain() and fit(). Validate posterize() bit counts from 1 through 8.
  • Improve raw palette decoding, palette color allocation, and palette cache updates.
  • Preserve floating-point scalar operands in ImageMath expressions 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.4

Release 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