Python interface for 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.7 | ✅ | N/A | ✅ | ✅ | ✅ |
CPython 3.8 | ✅ | ✅ | ✅ | ✅ | ✅ |
CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅ |
CPython 3.10 | ✅ | ✅ | ✅ | ✅ | ✅ |
CPython 3.11 | ✅ | ✅ | ✅ | ✅ | ✅ |
PyPy 3.8 v7.3 | ✅ | N/A | N/A | N/A | ✅ |
PyPy 3.9 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
pi_heif-0.9.2.tar.gz
(8.0 MB
view hashes)
Built Distributions
Close
Hashes for pi_heif-0.9.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dde79fb8f33b54d699b40c38ad5fa03a4004fb30855e27e3d80318f3266d5396 |
|
MD5 | 5cd62d8011c1074002d3f592d17a56dc |
|
BLAKE2b-256 | d35332b2b8e86f0f9a128747b3bec0818656f43ab924e99fa338022656a5cae7 |
Close
Hashes for pi_heif-0.9.2-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb664f0655daeff3b12727b1293b611007fc332f024ac23783696f1faadc2278 |
|
MD5 | 72d9cd2cd4a84fb7af53d23862a72afc |
|
BLAKE2b-256 | 9b544afed30bc4963a2aac631d52192c9b20d9d0e43b0a37edcc224e0246f69b |
Close
Hashes for pi_heif-0.9.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8cff70b0cfdb5ad8aa0e93503f3e7e7d753738c15599fa56ecb0d5b154f9669 |
|
MD5 | e64ee065885d2de9d7260c35057dceeb |
|
BLAKE2b-256 | 85fd55dff05874db3b8fb9422ff78286f65b063d97d7232b9339cbf716c3587b |
Close
Hashes for pi_heif-0.9.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bd45bdda99f73fa955be7b3102b5f5d701953ded1f7aea6a84ba7514a5617ee |
|
MD5 | f1d296a431de2ab5711050d33a33a190 |
|
BLAKE2b-256 | b1765ae792aed26ebda99266954e420708cc9a3783018e6055b53b712acb13da |
Close
Hashes for pi_heif-0.9.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9436fb7627564bf65a161c7e22c6ac17a69cdcb4a26d36c531ee6ce838e28bbe |
|
MD5 | 2401825aa692f2334c722c65bf5dbfee |
|
BLAKE2b-256 | 4ded7779ce3f44a83e3d5bcfecb9eeb3996e10c33571becba113688f467e4281 |
Close
Hashes for pi_heif-0.9.2-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab8fdf59c50b18f3bc0e6e3365902750f44d8e86cbb7bb0823b91f9dad43f83b |
|
MD5 | 15752f8dbc01727a81b913810a8e77a6 |
|
BLAKE2b-256 | 960acaa2c0f609a2185389bf9b7857c3d44fc159130d8d1bca9039fefacac183 |
Close
Hashes for pi_heif-0.9.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3940c6ce2ce617c5a0fff9c1ca41515205a93a31cf87315985cfeeb56fc73d9 |
|
MD5 | e0cd030918659ee6c116f897c016adf1 |
|
BLAKE2b-256 | c669400fe792332ec143d41201058bdf33df664d65ed2cf09fd56ff050b25082 |
Close
Hashes for pi_heif-0.9.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e10f7ad640c5f96cfe472b04b992f2d5102f4e30ec8eab864fd92f92b412cc8 |
|
MD5 | a3a999772528edbdba81f0ce6b8149a1 |
|
BLAKE2b-256 | c41938a3fd19d3f3e8714221cae60c2eee204b02adfe244a95cbe287b1fdd054 |
Close
Hashes for pi_heif-0.9.2-cp38-abi3-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 741cd024194deca933a6994935613116dd13215f4a677eedf256cf3849161167 |
|
MD5 | f19cf4cc9b763247e3172018ea9156c7 |
|
BLAKE2b-256 | ea227c96068fcaaeac4cd5721fce5c0aa31d0e71ce2128feb7183e291fa77d6c |
Close
Hashes for pi_heif-0.9.2-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19cbf1490658c8c816949f61cd15c703ea6db46b0d33ab56994bf6384162b5f6 |
|
MD5 | 9434130e13a2d2c62b5ddf6ec6914e79 |
|
BLAKE2b-256 | 117009173cb3a4ce6be1ca85e40bbd280365cb4ef477cd93ae54f03c6963d705 |
Close
Hashes for pi_heif-0.9.2-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0e24e522168386a2e582e1a78921b15270dae68e6465ee7d25ff9e26a251baa |
|
MD5 | 4715e2c3ebb27fb416c0666d67d6b2df |
|
BLAKE2b-256 | 5fbabb86c186be0ff0b0d4bff5c615d6b0d6a6f02c99bbe1a7f27dc3821692ec |
Close
Hashes for pi_heif-0.9.2-cp37-abi3-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dee34b17bc207612020e7a3afce2f6ed35d22bfb9dac9b69f48248c59bd9d0d2 |
|
MD5 | f2bf36d2ac5d2f0a70313c59ebe3be9a |
|
BLAKE2b-256 | 91d9b4cbf9e1ed3f0b541e7347d5dd138cd4fe9f99ab5e95cf52a1c063ebdcff |
Close
Hashes for pi_heif-0.9.2-cp37-abi3-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1c9af646f3c7a3a6f425808d175330f16dcaaefa50a225f41e07fc18cf771c3 |
|
MD5 | fc5f23ca0e4487df92dc84882020654c |
|
BLAKE2b-256 | acf97af8f83c8a8c02869fde2797b0d9261acaf1022d8d14dd14b0c460944172 |
Close
Hashes for pi_heif-0.9.2-cp37-abi3-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63543e22570bdb72f368dc634a1a34436439d7ecec37f3c72acf5ebcb7c418d5 |
|
MD5 | e9a0573ea2ac942f6b4ebf3fa867e929 |
|
BLAKE2b-256 | 51058b8db4dc7cf8d145132299e7369f943c8914a429982811e0ff0e17efcea7 |
Close
Hashes for pi_heif-0.9.2-cp37-abi3-manylinux_2_28_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8b0178dee6410f278ebd5d4601bd17fdb799a7ad068b2e15f335c9a5a4f6c48 |
|
MD5 | 976c6263a569f14b183f1e7a88352590 |
|
BLAKE2b-256 | 386d8c9449d37bfc493cdda61d6491e57b2bf8a0b26b3e88b34d4d9a920be1eb |
Close
Hashes for pi_heif-0.9.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98281867174b7b9dfbdaec4a509d950f051828f54cf21c93a866380ac463793d |
|
MD5 | bdab82e796e8802e506057584b6019d9 |
|
BLAKE2b-256 | 33b9c478e99d35f12d2f6bb6f20f0d30520973ebe49287c356fd2017bc421eec |
Close
Hashes for pi_heif-0.9.2-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b23b86979c5faa16d59ac565d931d9904f72c7bad4aec9e1283d1075b411db2 |
|
MD5 | b41603e0be6667d330258ae8968503ac |
|
BLAKE2b-256 | 9f094b8a32d24e89e17de7f020f91b66597c24184654f59f23d2ffe59ff63c2b |
Close
Hashes for pi_heif-0.9.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6aeaab2647d6bc9a7b2677d4a8da014046abdfc7a528b39e9f537c6700a61da |
|
MD5 | 179290bfe3406665399f10a776a1d5c3 |
|
BLAKE2b-256 | a7d347ce37e64f9fbf794c695626fab9933c61063370a2b6a124786de59f4c80 |
Close
Hashes for pi_heif-0.9.2-cp37-abi3-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c82a88be92b786fb8e4e609f00e91cc3ef46cb4f63a07b3561d1446be81c62e7 |
|
MD5 | 9512383d392ec332b07128020e97d1ce |
|
BLAKE2b-256 | 7187e03bb1d198ee35a57154dd3e1338a51857669ffb1cc1d50036a0d920be84 |