--- id: pi-heif version: "1.4.0" license: BSD-3-Clause license_treatment: copyleft maintenance: active --- # pi-heif — Python interface for libheif library License: copyleft · Maintenance: active · Downloads: 9.6M/mo ## What it is and what it does pi-heif is a lightweight Python wrapper around libheif that adds HEIF/HEIC image decoding to pillow. It is a more permissively-licensed variant focused on read-only operations: it decodes HEIF images but does not support save operations. The package integrates as a pillow plugin, allowing decoded image data to be accessed as NumPy arrays or pillow images. The package supports color depths from 8 to 12 bits, HDR-to-8-bit conversion, and access to depth images embedded in HEIF containers. It requires only pillow as a runtime dependency and is available as precompiled wheels for CPython 3.10, 3.11, 3.12 across macOS (Intel and ARM), Windows, and Linux platforms, reducing installation friction compared to source builds. Use it for: - Convert HEIC photos from iOS devices to other formats using pillow's standard image operations. - Extract depth maps from HEIF files for computational photography or 3D reconstruction workflows. - Process high-bit-depth HEIF images (10/12-bit) as NumPy arrays for scientific or image processing pipelines. - Integrate HEIF support into image processing pipelines that already use pillow without rewriting image-loading code. - Batch decode HEIC files to standard formats in automated image workflows or media asset management systems. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Decodes HEIF/HEIC image files and integrates with pillow for reading and conversion to other formats, supporting 8/10/12-bit color depths and depth images. Yes, if you need to read HEIF/HEIC files in Python and accept LGPLv3 copyleft terms. The package is actively maintained, has no known vulnerabilities, and precompiled wheels make installation straightforward. Verify that LGPLv3 licensing is compatible with your project before committing. ## Install pip install pi-heif uv add pi-heif poetry add pi-heif ## Installing pi-heif Before you install: Medium install friction due to compiled wheels; prebuilt binaries are available for CPython 3.10, 3.11, 3.12 on macOS (Intel and ARM), Windows, and Linux (manylinux and musllinux), reducing build complexity. Repository is active with recent commits. License in practice: Licensed under LGPLv3 (copyleft), which requires that derivative works and modifications remain under the same license; static linking may trigger additional obligations. Verify compatibility with your project's license before use. Quickstart: from pi_heif import register_heif_opener import pillow register_heif_opener() # Then use pillow's standard image operations on HEIC files Requires pillow as a runtime dependency; HEIF decoding depends on the underlying libheif library availability on your system. Verify before relying: - Whether LGPLv3 copyleft obligations apply to static vs. dynamic linking in your deployment context. - Performance characteristics and memory usage when decoding large or high-bit-depth HEIF files. - Compatibility with specific HEIF encoder variants or proprietary extensions beyond the standard. ## Package facts - License: BSD-3-Clause (copyleft) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 9.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags heif heic image decoder, heif image reader python, heic to png conversion, decode heic files, heif depth image support, heif pillow plugin, image-codec, heif-heic, pillow-plugin [View on SkillFed](https://skillfed.io/packages/pi-heif) · [View on PyPI](https://pypi.org/project/pi-heif/)