skillfed

pillow-heif

Python interface for libheif library

pillow-heif v1.5.0 13.2M downloads/30d#1,291 on PyPI302
Copyleft license BSD-3-Clause Active released

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-heif

uv

uv add pillow-heif

poetry

poetry add pillow-heif

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v2 (GPLv2)Operating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Multimedia :: GraphicsTopic :: Multimedia :: Graphics :: Graphics ConversionTopic :: Software DevelopmentTopic :: Software Development :: Libraries

Tags

heif heic image support pythonheic decoder encoderheif image format pythonheic to png conversion10-bit 12-bit heic processingheif depth image supportheic metadata exif xmp
heif-heic-codecimage-format-conversionmetadata-preservation

More Software Development packages