Willow
A Python image library that sits on top of Pillow, Wand and OpenCV
What it is and what it does
Willow is a wrapper library that unifies the APIs of Pillow, Wand, and OpenCV into a single interface, letting you work with images without needing to know which backend is available. It automatically converts images between libraries when an operation requires a specific backend—for example, face detection uses OpenCV even if you loaded the image with Pillow. The library supports basic image operations (resize, crop, rotate, format conversion) and more specialized tasks like face and feature detection.
It's written in pure Python and supports modern Python versions (3.10–3.14). You install it with low friction—only two small runtime dependencies—and then choose which image backends to install separately based on your needs. This makes it useful in environments where you want flexibility about which image library to use, or where you need to combine capabilities from multiple libraries in a single codebase.
Use it for:
- Build a thumbnail generation service that works with Pillow when available but falls back to Wand on systems where Pillow isn't installed.
- Detect faces in user-uploaded photos by automatically routing to OpenCV when needed, without forcing users to learn OpenCV's API.
- Convert between image formats (PNG, JPEG, WebP, AVIF, HEIC) using a consistent API regardless of which backend is installed.
- Process animated GIFs with frame counting and manipulation across different backends.
- Rotate and crop images with a single codebase that works across Pillow, Wand, and OpenCV without conditional imports.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Willow provides a unified API for image manipulation across Pillow, Wand, and OpenCV, automatically converting between libraries as needed for operations like resizing, cropping, face detection, and format conversion.
Yes, if you need a unified image API and want to avoid backend lock-in. Install friction is minimal, maintenance is active, and there are no known vulnerabilities. The permissive license poses no restriction. Only caveat: you must separately install at least one of Pillow, Wand, or OpenCV—Willow is a wrapper, not a standalone image library.
Install
willow on PyPI
pip
pip install willowuv
uv add willowpoetry
poetry add willowInstalling Willow
Before you install
Low friction: pure Python wheel with only two runtime dependencies (filetype and defusedxml). Actively maintained with recent commits and a stable release history since 2014.
License in practice
Permissive BSD license allows commercial and private use with minimal restrictions, making it suitable for most projects without legal friction.
Quickstart
from willow.image import Image
with open('test.png', 'rb') as f:
img = Image.open(f)
img = img.resize((100, 100))
with open('output.png', 'wb') as out:
img.save_as_png(out)
Requires Python 3.10 or later; at least one of Pillow, Wand, or OpenCV must be installed for actual image processing (not bundled).
Verify before relying
- Whether Pillow, Wand, or OpenCV are optional or required dependencies (fact sheet lists only filetype and defusedxml as runtime deps).
- Performance characteristics when converting between different backend libraries.
- Whether all listed operations work reliably across all supported Python versions (3.10–3.14).
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — filetype, defusedxml |
| Maintenance | actively maintained — 292 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 965,992/month — #4,621 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: willow-1.12.0-py3-none-any.whl
Keywords: Imaging
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
imutilsimutils provides convenience wrappers around…
unclear · top 15,000 on PyPI
pilkitPILKit provides a collection of image…
permissive · top 15,000 on PyPI
sorl-thumbnailGenerates and caches image thumbnails for…
permissive · top 15,000 on PyPI
pillow-heifpillow-heif adds HEIF/HEIC image format support…
copyleft · top 5,000 on PyPI
pi-heifDecodes HEIF/HEIC image files and integrates…
copyleft · top 5,000 on PyPI
pillow-jxl-pluginRegisters JPEG-XL codec support with Pillow,…
unclear · top 15,000 on PyPI
pillow-avif-pluginRegisters AVIF image format support with…
permissive · top 5,000 on PyPI
pilgramApplies Instagram-style filters and CSS-based…
permissive · top 15,000 on PyPI
kornia-rskornia-rs provides low-level computer vision…
permissive · top 5,000 on PyPI