Repository navigation
v0.0.5
Blanket 0.0.5 adds native font loading and text shaping, expands image format support, and introduces compressed TIFF output. It also improves wide-image handling and ships separate wheels for CPython 3.12 through 3.15.
New features
- ImageFont: Load TrueType/OpenType fonts with
truetype(), PIL bitmap fonts withload(), and the built-in fallback withload_default(). Measure text and render masks with native Rust rasterization and OpenType shaping, without FreeType or Pillow. - Text layout: Integrate fonts with
ImageDrawanchors, strokes, and multiline alignment. Outline fonts support Unicode bidirectional and script handling, OpenType features, and language options. - Additional image formats: Read and write Netpbm (PBM/PGM/PPM/PAM), TGA, QOI, JPEG 2000, PCX, SGI, XBM, XPM, and MSP. Adds read-only DDS, EPS, FITS, SPIDER, Pixar, and Sun raster support, plus PALM output.
- TIFF compression: Save TIFF images with LZW, Deflate, or JPEG compression in addition to uncompressed output. JPEG-compressed TIFF supports 8-bit grayscale and RGB images.
Fixes and processing improvements
- Improve wide-image handling across codecs, compositing, resizing, and quantization.
- Optimize extended-format pixel packing and JPEG 2000 decoding.
- Expand portable SIMD processing for compositing, extrema, enhancement, mode conversion, nearest-neighbor resizing, and overlay/hard-light channel operations.
- Improve median-cut quantization and identity unsharp-mask processing.
- Expand Pillow behavior verification across additional API and codec paths.
Build and compatibility notes
- Font rasterization and metrics can differ from Pillow. Glyph coverage depends on the selected font; automatic system-font fallback is unsupported. Both
ImageFont.Layoutvalues use Blanket's native shaper. - JPEG 2000 supports unsigned, equally sampled grayscale/RGB components up to 16 bits, with optional alpha; output is lossless JP2. EPS reading requires Ghostscript on
PATHand rasterizes to RGB at 72 DPI. - Format support varies by mode and sample depth. DDS reads the first surface, FITS reads the first plane, and SPIDER reads a 2D image or the first stack image. Animation and multipage editing remain unsupported.
- Wheels now target individual CPython versions instead of using the stable
abi3interface. Source builds require the nightly Rust toolchain pinned inrust-toolchain.toml.
Installation
Requires Python 3.12+:
pip install --upgrade pyblanket==0.0.5Release assets include CPython 3.12, 3.13, 3.14, and 3.15 wheels for Linux x86_64 and ARM64 (glibc 2.28+) and macOS 26+ on Apple Silicon, plus a source distribution.
Full changelog: v0.0.4...v0.0.5