Python 3.6+ interface to libheif library
Project description
pi-heif
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 only difference is the name of the imported project.
Install
python3 -m pip install -U pip
python3 -m pip install pi-heif
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 16 bit PNG using OpenCV
import numpy as np
import cv2
import pi_heif
heif_file = pi_heif.open_heif("images/rgb12.heif", convert_hdr_to_8bit=False)
heif_file.convert_to("BGRA;16" if heif_file.has_alpha else "BGR;16")
np_array = np.asarray(heif_file)
cv2.imwrite("rgb16.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)
Wheels
| Wheels table | macOS Intel |
macOS Silicon |
Windows 64bit |
musllinux* | manylinux* |
|---|---|---|---|---|---|
| CPython 3.6 | N/A | N/A | N/A | ✅ | ✅ |
| CPython 3.7 | ✅ | N/A | ✅ | ✅ | ✅ |
| CPython 3.8 | ✅ | ✅ | ✅ | ✅ | ✅ |
| CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅ |
| CPython 3.10 | ✅ | ✅ | ✅ | ✅ | ✅ |
| CPython 3.11 | ✅ | ✅ | ✅ | ✅ | ✅ |
| PyPy 3.7 v7.3 | ✅ | N/A | N/A | N/A | ✅ |
| PyPy 3.8 v7.3 | ✅ | N/A | N/A | N/A | ✅ |
* i686, x86_64, aarch64 wheels.
For ARMv7(armv7l) wheels are present for Debian 10+(Ubuntu 20.04+) and Alpine 14+.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pi_heif-0.8.0.tar.gz.
File metadata
- Download URL: pi_heif-0.8.0.tar.gz
- Upload date:
- Size: 8.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20df053d32830fbcaaaeb32274921cc6450d026bc278299c6126028e1dd20fa1
|
|
| MD5 |
8bbb281dbbc81ba29f02dbf153e3a2c9
|
|
| BLAKE2b-256 |
ec75a55256740a9564ab742fc9d3332c6140229b40e25374c05a052a42ae93ff
|
File details
Details for the file pi_heif-0.8.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pi_heif-0.8.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 751.5 kB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4264345b63648610e5d40b5bd8b8e82c2d40cd83ca73bb8c739cfcafc5e5dfe9
|
|
| MD5 |
8452fc517008e5b6d6548ca3bd60aced
|
|
| BLAKE2b-256 |
629e3bad3424cecd6674321153e346e9be81cd5e59a685c580eb49aba99bee34
|
File details
Details for the file pi_heif-0.8.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: pi_heif-0.8.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 782.3 kB
- Tags: PyPy, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28d4c9a93adafce09bc58101dd64bdf77f5eee662bc7e2152f6aec0e6bb2ab39
|
|
| MD5 |
751794bb87065d730988e883c495b7df
|
|
| BLAKE2b-256 |
31a1e0418c02212492c5fab26c18e50cf87e2e22aa891a75375f0c8fdf1369b0
|
File details
Details for the file pi_heif-0.8.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: pi_heif-0.8.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 708.0 kB
- Tags: PyPy, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84d126e23fe902b5afc420b988a2568b889f343743f57e0828116f57b807d64c
|
|
| MD5 |
7ab08ce1c5e4ae4208d0d4bb61d120aa
|
|
| BLAKE2b-256 |
c931614b005b66e3071196bd328918b2869c64f4d1f3b32e386e765d30ea00d4
|
File details
Details for the file pi_heif-0.8.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl.
File metadata
- Download URL: pi_heif-0.8.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
- Upload date:
- Size: 520.2 kB
- Tags: PyPy, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ead979753b3157b391e09a521a81e95f8170726e91f88486574c67ef51793da
|
|
| MD5 |
a4608ccb9499ab7798350c19cec8b58e
|
|
| BLAKE2b-256 |
75bc8396d8d501bf3136c0e63ebe014fd59a8c9122b5bff9c47350bca0f15d99
|
File details
Details for the file pi_heif-0.8.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pi_heif-0.8.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 752.0 kB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ebfe71fc941b20e06e8f3119a0a92775d165431ead06e3c43151759bb654a46
|
|
| MD5 |
c10324c1f9390762a661fcf6459860fd
|
|
| BLAKE2b-256 |
0fee5b6dd7c20085b0f77c31e17587d7be0a4420ee05cf630e1f87ed61bc4131
|
File details
Details for the file pi_heif-0.8.0-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: pi_heif-0.8.0-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 782.9 kB
- Tags: PyPy, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e6e7c5fcede1081bbd011cae808edec33a93eb0ec0e76a60b58cf6c87c1da2e
|
|
| MD5 |
11e0a3f477f1958e802b9c8819c5f553
|
|
| BLAKE2b-256 |
77deacf218a41c2e68cbeb4ce11d7454dd7e63287040e2f2bd414a3ec2bc863f
|
File details
Details for the file pi_heif-0.8.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: pi_heif-0.8.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 708.3 kB
- Tags: PyPy, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26816b1d5e05a402c4a971eb3544c00d96992d7a3c78a6fd2a300a66f43b44f4
|
|
| MD5 |
238c6f10c1a5c54ac342c8db4b2467db
|
|
| BLAKE2b-256 |
010acf1d762e898bad90583ca6f81f66784b5204456db676f6338fe93587ad07
|
File details
Details for the file pi_heif-0.8.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl.
File metadata
- Download URL: pi_heif-0.8.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
- Upload date:
- Size: 520.2 kB
- Tags: PyPy, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae96093f33f820b86a1be40293a70c819ba82dff338cff8a78a4676efb4b59e6
|
|
| MD5 |
a68ba6f1ac961924748abc5c521d176d
|
|
| BLAKE2b-256 |
dd36b3d24b4ce25d1e705a7c9a2b6a768262a52311daa2e6d56482353d4d0c37
|
File details
Details for the file pi_heif-0.8.0-cp38-abi3-macosx_12_0_arm64.whl.
File metadata
- Download URL: pi_heif-0.8.0-cp38-abi3-macosx_12_0_arm64.whl
- Upload date:
- Size: 573.0 kB
- Tags: CPython 3.8+, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b33a77d3ef7897c475d6c67caef5a149f0b96328d3937f9f65f0a3763f76e809
|
|
| MD5 |
3970bbe77753f5763cfd0769152d1447
|
|
| BLAKE2b-256 |
8eda0737638035c6a42ce8eba772c9eaf849934f519675293f00acf8c86e1273
|
File details
Details for the file pi_heif-0.8.0-cp37-abi3-win_amd64.whl.
File metadata
- Download URL: pi_heif-0.8.0-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d61897e371bfbc28790f1deb38b3d101e4a71788da2ccad577107727d9b997c
|
|
| MD5 |
bf73a92584d1bb682f4298412e420c18
|
|
| BLAKE2b-256 |
a75a8de9de1044c9b5bf6753faa7216fa9ed4507336ec2d90a8945c751787acc
|
File details
Details for the file pi_heif-0.8.0-cp37-abi3-musllinux_1_2_armv7l.whl.
File metadata
- Download URL: pi_heif-0.8.0-cp37-abi3-musllinux_1_2_armv7l.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.7+, musllinux: musl 1.2+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26b897261d8821f7203844abd4f681dd164899385c269fefe2b8965c15d04b9e
|
|
| MD5 |
ee63fe9167c11bb3a28b2f3f61c644cf
|
|
| BLAKE2b-256 |
03b2f8496d0aba56c421dd8205756384c06a0f2c37332f2da50584e921a8f576
|
File details
Details for the file pi_heif-0.8.0-cp37-abi3-manylinux_2_28_armv7l.whl.
File metadata
- Download URL: pi_heif-0.8.0-cp37-abi3-manylinux_2_28_armv7l.whl
- Upload date:
- Size: 659.0 kB
- Tags: CPython 3.7+, manylinux: glibc 2.28+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd7f5cd14220f325ab2ce097736231b6aa2e55f537368bf1b132765dcb847cb7
|
|
| MD5 |
9f03ae0443cff7425ab8c8677fddcb1b
|
|
| BLAKE2b-256 |
adc8b61386846a388adea3e4d48b29066e1edf2202f616c8e4bd174b1f766bae
|
File details
Details for the file pi_heif-0.8.0-cp37-abi3-macosx_10_9_x86_64.whl.
File metadata
- Download URL: pi_heif-0.8.0-cp37-abi3-macosx_10_9_x86_64.whl
- Upload date:
- Size: 554.9 kB
- Tags: CPython 3.7+, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5356b50ed5d1f541b0d52cafcaf8e8d3c9733e21763594877b380d77801ce15
|
|
| MD5 |
3747306436e23337716b86808dea2168
|
|
| BLAKE2b-256 |
76584bcf457e480d1fe732352a97c85bbc07b75e5b64dbb7b64b441898f906cf
|
File details
Details for the file pi_heif-0.8.0-cp36-abi3-musllinux_1_1_x86_64.whl.
File metadata
- Download URL: pi_heif-0.8.0-cp36-abi3-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.6+, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b95f69d791e4267c44aa2d365cfee98a446b2f30a73ccdc681f7a6fa9cd13659
|
|
| MD5 |
399056d8d4973aa03c836ede305938b8
|
|
| BLAKE2b-256 |
d13e64d2061ed5d3d25877a727413156074f817d9e7ce8ca8fdfa0612acd105c
|
File details
Details for the file pi_heif-0.8.0-cp36-abi3-musllinux_1_1_i686.whl.
File metadata
- Download URL: pi_heif-0.8.0-cp36-abi3-musllinux_1_1_i686.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.6+, musllinux: musl 1.1+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efa3cdf32ae7eaa812ef2e2ef60b984113e1ff1972a0400b4197b230e5ef72cf
|
|
| MD5 |
1c12fc879ca86d8ca21bcb8bb3fb8277
|
|
| BLAKE2b-256 |
bf25fc308108f5069648e04f196ae89d7210acce5fc93985955b17d017a6e864
|
File details
Details for the file pi_heif-0.8.0-cp36-abi3-musllinux_1_1_aarch64.whl.
File metadata
- Download URL: pi_heif-0.8.0-cp36-abi3-musllinux_1_1_aarch64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.6+, musllinux: musl 1.1+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9541cbdfda17a1714267887229797f0295d4067af01e00a8509a3697b2d6d5b6
|
|
| MD5 |
3156403f14dc96db004c7e3e07e81a48
|
|
| BLAKE2b-256 |
96f656cab9c698a9aebc71c3ffd6eb3236f6eddeb7a867f48933de9d977642f8
|
File details
Details for the file pi_heif-0.8.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pi_heif-0.8.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 929.5 kB
- Tags: CPython 3.6+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f02d9e8620bbef23def3de273afd7487938bfc57b02b6ef3bc1ac7634c4db95e
|
|
| MD5 |
c67e8b93773467cd8941edc21990944e
|
|
| BLAKE2b-256 |
d8251fc3900b9c54f20a827d3a6ee0118f26df8a8410a174df5218085d39c6ff
|
File details
Details for the file pi_heif-0.8.0-cp36-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: pi_heif-0.8.0-cp36-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 935.8 kB
- Tags: CPython 3.6+, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
252de56f0b40cd6bdc021d5f7ed22e66bfda56ca84117f9699a41423eaae4794
|
|
| MD5 |
e8a997abef06394238b2397643a63ba5
|
|
| BLAKE2b-256 |
1668d3e71a0436372919185d2a33f84172c9ee04a7768c0d10a7bedd8b5d7234
|
File details
Details for the file pi_heif-0.8.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: pi_heif-0.8.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 884.6 kB
- Tags: CPython 3.6+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fedfdbb1dc8a300edab70a7efbe4af09ededb9aa7734f043cb19458853417287
|
|
| MD5 |
4a5d2c9e2270e59eb39917bbe3598eb0
|
|
| BLAKE2b-256 |
748dc36e8565e600a68e4b27d6c62bd88c4cbc5dee50a95382d0a05b6655828c
|