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
) there is a pi_heif-x.x.x-cp38-abi3-manylinux_2_31_armv7l.whl
wheel on pypi
for Debian11+ based systems.
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.7.0.tar.gz
(8.0 MB
view hashes)
Built Distributions
Close
Hashes for pi_heif-0.7.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25457c7283c836d642aa6a0d42e8c69a21653eba9b523e6814fb32a1ef2305bb |
|
MD5 | b13b91be8e016a5c4af742f55ccdf45a |
|
BLAKE2b-256 | 6a74a838bd1287cdf0597f3fe827a592ba8ba57bdec50006415b42635de16f2c |
Close
Hashes for pi_heif-0.7.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce6f8331c373cb9664f741c3db225b9704b168b6b12cedd436800760b961824f |
|
MD5 | f1207bb3a63ab14668d7f112d0565b65 |
|
BLAKE2b-256 | 21e914ad371061e9df99e4671316e31b7edf55a884209326107ed9093f12ba47 |
Close
Hashes for pi_heif-0.7.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cefd1b4126f7cf1a63447976583b40a9d50dc0e287ccd6eba92fa31f129d477 |
|
MD5 | 3c5fa5a4a1ad0ae859b6733a4462af4d |
|
BLAKE2b-256 | 98e67d46bbbd662fce7996a7419894814b92ee4d602a5073606cff5a04870c56 |
Close
Hashes for pi_heif-0.7.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2990812f7757ce1a8619d978b895d929c323e9778a290c7c1eb2e39f66cc5cac |
|
MD5 | 424c19409de6b87f4420014bd9f70782 |
|
BLAKE2b-256 | b590cbe52f9b798030189148b6e9007c1a27027ffe1563b12be33202a4e56768 |
Close
Hashes for pi_heif-0.7.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1ab55b4280071605ed787ea68e358523f39131db5339d12c1e15d12511b69a8 |
|
MD5 | 913c066a5d07f1e9d8b542e41982135b |
|
BLAKE2b-256 | f7f85470484aa69de15ce66c80e5befb930a4859918e08fcb70304e78a4b2fe7 |
Close
Hashes for pi_heif-0.7.0-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8348b04381b8f38de86357215899156003282142e88f4c64cfeaf4c2a8b1be7f |
|
MD5 | c00e03b3bdea460304327ffa72c1fc32 |
|
BLAKE2b-256 | 6e84bdefd3ae0f1df5ee5fe6a162487f2b07376b8518029fd7b6a53406169470 |
Close
Hashes for pi_heif-0.7.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 292a168cdbc0a9fdfac031045b154b1d67f1694ab5b4ddf0cc94ed4ecfc8fd3d |
|
MD5 | 8ca26d4ab3a82e66d23443d35a368866 |
|
BLAKE2b-256 | c567687a1d278ca3c9f1a59af4546ebda7b9cb92820b55a14f325e6b7fead004 |
Close
Hashes for pi_heif-0.7.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9119cf12d9a38b434b848233a69c74363765eb13d894afbe1189c22ff2d0c28e |
|
MD5 | f4cbb848af72fcbb29a37d5d5d7bc0b5 |
|
BLAKE2b-256 | 812eb37a7b9a6f80d336f9bc65fb1ae80d9558860a2692c101575a240e841473 |
Close
Hashes for pi_heif-0.7.0-cp38-abi3-manylinux_2_31_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cb755bea35cdf132eab6b4c1de6234e518ddb475e1bdd309f7b8b849e8f30d3 |
|
MD5 | 41d85428d9d5d200dedcdb7964c8e67a |
|
BLAKE2b-256 | ce62c52e9346e798da01d526daa732279cc164ceb9bf61393fa2202bfe857fc6 |
Close
Hashes for pi_heif-0.7.0-cp38-abi3-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7f385b4cd94d1c24255ae72804acef30b4134bf396955efcfb7e41c8fa01a45 |
|
MD5 | 55666c70fd6d3ff4d8704cea9532f0e6 |
|
BLAKE2b-256 | f5e28a9a993f4d902fdcbad532c75039b22ef58ee3e3efe5b6db91c21d2fb131 |
Close
Hashes for pi_heif-0.7.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e9aa7d907d0ec9af36efdb95188d75f3abad1a088d8aa9b9b3b0e00be52f65e |
|
MD5 | 0d45db2b5f96fdc65d87f1d91b9cb19a |
|
BLAKE2b-256 | daa96933ef4d36a7b8dc8a08c4b55427de9b732c18e0560fda315dae0ca8697b |
Close
Hashes for pi_heif-0.7.0-cp37-abi3-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ec712a9f771ac2b527b353b25474484e6c24d2d0317724bf57ae879591ec16b |
|
MD5 | 8b82544f809cf36c37e2b848abe854f5 |
|
BLAKE2b-256 | ee945b8e492806d2a84faaafe5d742cccbbca44632e61a45dc24b8635d55dbd4 |
Close
Hashes for pi_heif-0.7.0-cp36-abi3-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc095ff85aa0c15c3a7b5ffe28fe3c7079a8050bf63e59e12f75fadd8d6d631a |
|
MD5 | 8eb900e48529aa8993a3040341d6b5f9 |
|
BLAKE2b-256 | aa1d93397161a43af79c2ad050c077dd9ab858144726ff34ec56a5912d03622a |
Close
Hashes for pi_heif-0.7.0-cp36-abi3-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 195048eee5b47b5c61f2a64b210ac3d57970ea3995f64abda043a2965233afef |
|
MD5 | a1831f187038e12006b589e7d074c5ea |
|
BLAKE2b-256 | 9b60bf986faaea23a62737dd642609fa12e47af157a6113aa681992660915d0e |
Close
Hashes for pi_heif-0.7.0-cp36-abi3-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5f78c028c778d5984b00524539756e849f5538d7954857e43134b5a8cebf6e8 |
|
MD5 | 9fbfea0160b4d3785f6f369e372b8b8a |
|
BLAKE2b-256 | 9c77a23c3b8dc2f644e4d8d17ab63d7f02704aa5e8e3be81a17aa4d89869da8d |
Close
Hashes for pi_heif-0.7.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e93876a713e7c3331f420bb5cf141765845c39bb4ce7aae2305c865ae426417b |
|
MD5 | 2d77d7cfe50840aa67e682944f65cac6 |
|
BLAKE2b-256 | af0ed0143e16a5747077cd45abeae166ac4fb01add72f6a5e0493b4f8c86ac55 |
Close
Hashes for pi_heif-0.7.0-cp36-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34400f933f6d29e9fb539e0ebdfeae5ce5ae6a187014877a5579db961f65a19c |
|
MD5 | 4da1cd98fc703d6811013e5edabaf9d5 |
|
BLAKE2b-256 | 2202f80410ab853e654a469c2de8abc78f1dd22b44a5787da904d639629e9add |
Close
Hashes for pi_heif-0.7.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dc2093a5db1a80c4a25890389aa3a76dd55e78027520c58f7110451ac67b163 |
|
MD5 | 6f74f7a40115fec9cac2a3e70837e543 |
|
BLAKE2b-256 | 8221675824a9378cc34e50f7c9d8af21baa4fa54d5b34f9f9a8836a86f0bde89 |