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.post2

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.post2
File
pi_heif_decoder-1.7.0.post2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
pi_heif_decoder-1.7.0.post2-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.post2-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details
pi_heif_decoder-1.7.0.post2-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details

Total release size: 6.3 MB

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

Download URL pi_heif_decoder-1.7.0.post2-cp313-cp313-win_amd64.whl
Size 2.4 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
0874e44f478626013abd54a4376eef349597e33e85879f26838dcf01fc4187d8
BLAKE2b-256 checksum
How to use checksums
764e2af32ba4684314b816cfa943bb847de6db1be0d432e87977690dc52b6f2f
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.post2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pi_heif_decoder-1.7.0.post2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.5 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
774293eaf67ff20a094461e8c140856025c9afe2b7d874fa1df6d81f11515b0a
BLAKE2b-256 checksum
How to use checksums
bb6c00dfc6a526a6fc3449ae000633585c4cd2f499af1ec81269790befb530e4
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.post2-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL pi_heif_decoder-1.7.0.post2-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
ea4ab736734893c47c06d31f15ad79573182a14e1865ec051074b99580b826e3
BLAKE2b-256 checksum
How to use checksums
61c7ff1d196c2d9390cf63f7e9c72eb27cf17e72f022f32f85543f7155f880f0
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.post2-cp313-cp313-macosx_11_0_arm64.whl

Download URL pi_heif_decoder-1.7.0.post2-cp313-cp313-macosx_11_0_arm64.whl
Size 959.0 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0e93770fc7fbda1430f854313034bf341cc26d6f03cc3c12e5cc9db1269c8681
BLAKE2b-256 checksum
How to use checksums
66b77f26914060582d08d2045dec233f12866baa1b3dc455ab0a916b020df6aa
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.post2 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