pillow-heif
Python interface for libheif library
What it is and what it does
pillow-heif is a Python binding to libheif that brings HEIF/HEIC image format support to the Pillow image library. It handles decoding and encoding of 8, 10, and 12-bit HEIC files, preserves EXIF, XMP, and IPTC metadata, and supports advanced features like depth images, thumbnail manipulation, and grid-tiled encoding. The package works as a Pillow plugin—register it once and Pillow's standard Image.open() and save() calls transparently handle HEIC files—or use its standalone API to work directly with HEIF data.
The package is actively maintained and distributed as precompiled wheels for modern Python versions (3.10–3.14) across macOS, Windows, and Linux. Its single runtime dependency is pillow, making it straightforward to integrate into image processing pipelines. The medium install friction reflects the compiled nature of the bindings, but prebuilt wheels eliminate the need to compile libheif locally on most platforms.
Use it for:
- Add HEIC file support to a Pillow-based image processing pipeline with one-line plugin registration.
- Convert HEIC images to other formats while preserving or manipulating embedded metadata.
- Process high bit-depth (10 or 12-bit) HEIC files from modern cameras or Apple devices.
- Extract and work with depth maps embedded in HEIC files from iPhone depth-capture photos.
- Encode images as HEIC with grid tiling to match Apple device output formats.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pillow-heif adds HEIF/HEIC image format support to Python, enabling decoding and encoding of 8, 10, and 12-bit HEIC files with metadata and depth image handling.
Yes, if you need HEIF/HEIC support in Python. The package is actively maintained, has no known vulnerabilities, and offers precompiled wheels for all major platforms and Python versions. The copyleft license classification warrants verification for proprietary use, but the library itself is straightforward to integrate via Pillow's plugin system or direct API calls.
Install
pillow-heif on PyPI
pip
pip install pillow-heifuv
uv add pillow-heifpoetry
poetry add pillow-heifInstalling pillow-heif
Before you install
Medium install friction due to compiled wheels; prebuilt binaries are available for CPython 3.10–3.14 and PyPy 3.11 across macOS (Intel and ARM), Windows, manylinux, and musllinux. Active maintenance with a release 23 days ago.
License in practice
Licensed under BSD-3-Clause (raw) but marked as copyleft in treatment; verify the implications for your use case, particularly if distributing proprietary software.
Quickstart
from pillow_heif import register_heif_opener
register_heif_opener()
# Then use pillow's Image.open() and save() on .heic files
Requires pillow as a runtime dependency; libheif C library bindings are compiled into the wheel.
Verify before relying
- Whether BSD-3-Clause license classification as 'copyleft' in the fact sheet aligns with standard copyleft definitions.
- Performance characteristics for large-scale batch HEIC encoding/decoding operations.
- Compatibility with non-standard HEIC variants or proprietary extensions.
Package facts
| License | BSD-3-Clause (copyleft) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — pillow |
| Maintenance | actively maintained — 23 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 13,249,037/month — #1,291 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pillow_heif-1.5.0-cp310-cp310-macosx_10_15_x86_64.whl; pillow_heif-1.5.0-cp310-cp310-macosx_11_0_arm64.whl; pillow_heif-1.5.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; pillow_heif-1.5.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; pillow_heif-1.5.0-cp310-cp310-musllinux_1_2_aarch64.whl; pillow_heif-1.5.0-cp310-cp310-musllinux_1_2_x86_64.whl; pillow_heif-1.5.0-cp310-cp310-win_amd64.whl; pillow_heif-1.5.0-cp310-cp310-win_arm64.whl; pillow_heif-1.5.0-cp311-cp311-macosx_10_15_x86_64.whl; pillow_heif-1.5.0-cp311-cp311-macosx_11_0_arm64.whl; pillow_heif-1.5.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; pillow_heif-1.5.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; pillow_heif-1.5.0-cp311-cp311-musllinux_1_2_aarch64.whl; pillow_heif-1.5.0-cp311-cp311-musllinux_1_2_x86_64.whl; pillow_heif-1.5.0-cp311-cp311-win_amd64.whl; pillow_heif-1.5.0-cp311-cp311-win_arm64.whl; pillow_heif-1.5.0-cp312-cp312-macosx_10_15_x86_64.whl; pillow_heif-1.5.0-cp312-cp312-macosx_11_0_arm64.whl; pillow_heif-1.5.0-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; pillow_heif-1.5.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Keywords: heif, heic, pillow
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
pi-heifDecodes HEIF/HEIC image files and integrates…
copyleft · top 5,000 on PyPI
pyheifReads HEIF/HEIC image files and exposes their…
permissive · top 15,000 on PyPI
imagesizeReads image file headers to extract dimensions,…
permissive · top 1,000 on PyPI
WillowWillow provides a unified API for image…
permissive · top 5,000 on PyPI
pillowPillow adds image processing capabilities to…
permissive · top 100 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
ExifReadExtracts Exif metadata from digital image files…
unclear · top 5,000 on PyPI
qoiA Python wrapper for the QOI (Quite OK Image)…
permissive · top 15,000 on PyPI
python-xmp-toolkitRead and write XMP metadata in image and…
permissive · top 15,000 on PyPI