pyheif
Python 3.6+ interface to libheif library
Decision gist · record as of 2026-08-14
Yes, if you need to read HEIC/HEIF files on Linux or macOS. The package is actively maintained, has no known vulnerabilities, and fills a clear gap for Apple image format support. Install friction is moderate due to system library dependencies, but prebuilt wheels ease setup on standard Linux distributions. Not suitable for Windows or write-heavy workflows.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires libheif, libde265, and libffi system libraries installed; not available on Windows; only reading is supported, not writing.
- Medium friction: requires precompiled wheels on Linux (manylinux2014 x86_64/aarch64) but needs system libraries (libheif, libde265, libffi) when building from source on macOS or Linux.
- Repository is active with recent commits and no Windows support.
License · maintenance · safety
permissive license (permissive) — Permissive license allows commercial and private use without restriction, though exact license terms are not specified in the package metadata.
last release 2024-09-01 (712 days) · last repo commit 2026-08-04 · 182 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 163,932 downloads/mo, #10,561 on PyPI
Alternatives
Verify before relying
import pyheif
heif_file = pyheif.read("image.HEIC")
print(heif_file.mode, heif_file.size, len(heif_file.data))- Whether cffi is automatically installed as a dependency or must be pre-installed separately.
- Performance characteristics when processing large HEIF files or containers with many images.
- Exact license identifier (Apache 2.0 inferred from classifier but not confirmed in metadata).
What it is and what it does
pyheif is a Python wrapper around the libheif C library that lets you read HEIF and HEIC image files—the modern container formats used by Apple devices. It exposes the decoded image data (pixel bytes, dimensions, color mode) along with metadata and the full container structure, so you can extract images and their properties programmatically.
The package is read-only: it decodes HEIF containers and images but does not write them. It works on Linux and macOS with prebuilt wheels for modern Python versions (3.6+), though building from source requires system libraries. The decoded image data can be passed directly to Pillow for further manipulation or conversion to other formats like JPEG.
Use it for
- Extract pixel data from iPhone or iPad photos (HEIC format) for processing in Python image libraries.
- Batch convert HEIC files to JPEG or PNG by reading with pyheif and saving via Pillow.
- Access metadata and color profiles embedded in HEIF files for archival or analysis.
- Parse HEIF container structure to enumerate all images, depth maps, and auxiliary images in a single file.
- Integrate HEIC support into web applications or image processing pipelines on Linux servers.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to read HEIC/HEIF files on Linux or macOS.
The package is actively maintained, has no known vulnerabilities, and fills a clear gap for Apple image format support. Install friction is moderate due to system library dependencies, but prebuilt wheels ease setup on standard Linux distributions. Not suitable for Windows or write-heavy workflows.
Install
pyheif on PyPI
Before you install
Medium friction: requires precompiled wheels on Linux (manylinux2014 x86_64/aarch64) but needs system libraries (libheif, libde265, libffi) when building from source on macOS or Linux. Repository is active with recent commits and no Windows support.
Requires libheif, libde265, and libffi system libraries installed; not available on Windows; only reading is supported, not writing.
License in practice
Permissive license allows commercial and private use without restriction, though exact license terms are not specified in the package metadata.
Quickstart
import pyheif
heif_file = pyheif.read("image.HEIC")
print(heif_file.mode, heif_file.size, len(heif_file.data))
Verify before relying
- Whether cffi is automatically installed as a dependency or must be pre-installed separately.
- Performance characteristics when processing large HEIF files or containers with many images.
- Exact license identifier (Apache 2.0 inferred from classifier but not confirmed in metadata).
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagecffi |
| Maintenance | Actively maintained 712 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 163,932 / month, #10,561 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3 |
Evidence: pyheif-0.8.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pyheif-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pyheif-0.8.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pyheif-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pyheif-0.8.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pyheif-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pyheif-0.8.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pyheif-0.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pyheif-0.8.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pyheif-0.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pyheif-0.8.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pyheif-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pyheif-0.8.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pyheif-0.8.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pyheif-0.8.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pyheif-0.8.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “read heic files python”
- pyheifReads HEIF/HEIC image files and exposes their decoded pixel data,…
- pillow-heifpillow-heif adds HEIF/HEIC image format support to Python, enabling…
- pi-heifDecodes HEIF/HEIC image files and integrates with pillow for reading…
Give your agent the search over MCP, or paste the wish link into any chat.
More Graphics packages
Pillow adds image processing capabilities to Python, providing file format support, efficient pixel data handling, and image manipulation operations.
Install it if you need to work with images in Python—it is the de facto standard for this task.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Enables matplotlib figures to display inline directly within Jupyter notebooks and IPython environments instead of in separate windows.
PyMuPDF extracts, renders, converts, and manipulates PDF and other document formats (XPS, EPUB, images, Office files via Pro) with high performance, providing text, tables, images, and metadata with precise layout information.
The AGPL license requires careful review if you are building proprietary software—commercial licensing is available from Artifex.
pypdfium2 is a Python binding to PDFium that enables PDF rendering, inspection, manipulation, and creation through a ctypes interface to Google's PDFium library.
Install it if you need PDF rendering, inspection, or manipulation in Python; the medium install friction is offset by comprehensive platform support.
Altair is a declarative Python library for creating interactive statistical visualizations by writing simple, readable code that compiles to Vega-Lite specifications.
See also pi-heif · pillow-heif · imagesize · pydicom · pyais · ExifRead · loadimg · qoi · pyzbar · piexif