Skip to main content

pi-heif decoder-only maintenance fork

This branch continues the decoder-only pi-heif package after upstream discontinued it in PR #431. The pi-heif-specific changes are maintained as a small patch series on top of the latest stable pillow-heif release (currently v1.7.0) so fixes and features can continue to flow from upstream. It builds against a current, decoder-only libheif without GPL encoders.

Linux wheels bundle only decoder-capable libheif and libde265. They do not build or ship x265, x264, AOM, dav1d, OpenH264, or encoder plugins.

Decoder artifacts

PythonVersion impl pypi

Mac OS Windows Linux Alpine Linux Raspberry Pi

This is a light version of Pillow-Heif with more permissive license for binary wheels.

It includes only HEIF decoder and does not support save operations.

All codebase are the same, refer to pillow-heif docs.

The distribution name is pi-heif-decoder; the Python import remains pi_heif. Releases currently provide CPython 3.13 manylinux wheels for x86_64 and aarch64.

License boundary

The wheel contains the BSD-licensed Python extension plus dynamically linked, LGPL-licensed libheif and libde265. LGPL source and license locations are recorded in LICENSES_bundled.txt inside the distribution.

Install

python3 -m pip install -U pip
python3 -m pip install pi-heif-decoder

Example of use as a Pillow plugin

from PIL import Image
from pi_heif import register_heif_opener

register_heif_opener()

im = Image.open("images/input.heic")  # do whatever need with a Pillow image
im.show()

8/10/12 bit HEIF to 8/16 bit PNG using OpenCV

import numpy as np
import cv2
import pi_heif

heif_file = pi_heif.open_heif("image.heic", convert_hdr_to_8bit=False, bgr_mode=True)
np_array = np.asarray(heif_file)
cv2.imwrite("image.png", np_array)

Get decoded image data as a Numpy array

import numpy as np
import pi_heif

if pi_heif.is_supported("input.heic"):
    heif_file = pi_heif.open_heif("input.heic")
    np_array = np.asarray(heif_file)

Accessing Depth Images

from PIL import Image
from pillow_heif import register_heif_opener
import numpy as np

register_heif_opener()

im = Image.open("../tests/images/heif_other/pug.heic")
if im.info["depth_images"]:
    depth_im = im.info["depth_images"][0]  # Access the first depth image (usually there will be only one).
    # Depth images are instances of `class HeifDepthImage(BaseImage)`,
    # so work with them as you would with any usual image in pillow_heif.
    # Depending on what you need the depth image for, you can convert it to a NumPy array or convert it to a Pillow image.
    pil_im = depth_im.to_pillow()
    np_im = np.asarray(depth_im)
    print(pil_im)
    print(pil_im.info["metadata"])

Wheels

Wheels table macOS
Intel
macOS
Silicon
Windows
musllinux* manylinux*
CPython 3.10 ✅ ✅ ✅ ✅ ✅
CPython 3.11 ✅ ✅ ✅ ✅ ✅
CPython 3.12 ✅ ✅ ✅ ✅ ✅
CPython 3.13 ✅ ✅ ✅ ✅ ✅
CPython 3.14 ✅ ✅ ✅ ✅ ✅
CPython 3.14t ✅ ✅ ✅ ✅ ✅
PyPy 3.11 v7.3 ✅ ✅ ✅ N/A ✅

* x86_64, aarch64 wheels.

Metadata

Release files for pi-heif-decoder 1.7.0.post3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pi-heif-decoder 1.7.0.post3
File
pi_heif_decoder-1.7.0.post3-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
pi_heif_decoder-1.7.0.post3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
pi_heif_decoder-1.7.0.post3-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details
pi_heif_decoder-1.7.0.post3-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details

Total release size: 6.4 MB

Release files / pi_heif_decoder-1.7.0.post3-cp313-cp313-win_amd64.whl

Download URL pi_heif_decoder-1.7.0.post3-cp313-cp313-win_amd64.whl
Size 2.4 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
b641b7fd6ef3aad9dfe20c2453782ad464a19708ba3dfdc02de67e9242334fd8
BLAKE2b-256 checksum
How to use checksums
b82a55804e7e56df85be323a2d93b1a73ed2106a2da764ad0bdc1e1071ceab52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / pi_heif_decoder-1.7.0.post3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pi_heif_decoder-1.7.0.post3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.6 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d9d9619b556f73038884865ff7b20a1c453d233b4fccd28ee2474899ceb85347
BLAKE2b-256 checksum
How to use checksums
e90ef31520478ee55631875cbf321ef42534b655aa4503ad488d84a1f71fbb67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / pi_heif_decoder-1.7.0.post3-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL pi_heif_decoder-1.7.0.post3-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 1.4 MB
Tags CPython 3.13 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
9fe4ede7308a637de88fb177d296325d0cea193c0df9806dac14d351f08b9aab
BLAKE2b-256 checksum
How to use checksums
ac35d307ea07cdbe4aee751404611b6ae1a574e2fb78157ef26f821ce01a7664
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / pi_heif_decoder-1.7.0.post3-cp313-cp313-macosx_11_0_arm64.whl

Download URL pi_heif_decoder-1.7.0.post3-cp313-cp313-macosx_11_0_arm64.whl
Size 967.4 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3ffb1e6888b4bacaae6a3810723a12a6cda60a09c9e84fbe689ce35090798361
BLAKE2b-256 checksum
How to use checksums
3200064f71888463d8bdf1eeb2c50a9b8f7540a06a188b37dd0aacf89b828fbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.7.0.post3 This release

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page