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.1.tar.gz
(8.0 MB
view hashes)
Built Distributions
Close
Hashes for pi_heif-0.9.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45c1829a736d0c228bb102e623d4b897a69957d6bb25a2c7b050489247f7f9ed |
|
MD5 | ba3b0663929f76f9ec59ee7abfcae767 |
|
BLAKE2b-256 | eb39948c5af30dd8021abf571e9c1e5fd36ae580345db274b6585f32bd342be9 |
Close
Hashes for pi_heif-0.9.1-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a9fab242f8e7b02efccc235b947e139001c6047526e71d272c1374717793300 |
|
MD5 | 9f3da0f9099d353e38cd82f86b332900 |
|
BLAKE2b-256 | ff3a56437b68bb6d50fe3be896620a9010b0588b5c4860b24075d827d9b7b8aa |
Close
Hashes for pi_heif-0.9.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb22a668d6d47f4307895e7e2cd911c1bd7608ce2db7c6a80ef425dae9ca651a |
|
MD5 | 73ba46e160a2f244cc588ffd890fe42c |
|
BLAKE2b-256 | b7a7ed53296f4de3ae946356b04fccb880d707d8882e006eff589a2f6e88a14c |
Close
Hashes for pi_heif-0.9.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39e9171baf126b26b7938da3a61a85c6da6c90f4efbe8432241a68af690b932f |
|
MD5 | ef50061f3d36ce57e03b9a76d310cdd9 |
|
BLAKE2b-256 | 693d43a3b4a5067f3f3ae8cd73383f7a6f1cb5034a8555782944e25a728fe753 |
Close
Hashes for pi_heif-0.9.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8a0bbc6ee304fac8ec860d567a2302aaaca33421e28f01dad522fc4eb626f47 |
|
MD5 | d78f99bf0a18b7fa7e00425ecc485932 |
|
BLAKE2b-256 | 24b112d953c831e7f21d91af971a451872599fc062af5073c1651fd097ce5aa8 |
Close
Hashes for pi_heif-0.9.1-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 039fff37d4e1de250dd7d8ebbb2b002139b979a66c20cfd5a848871763dd06d8 |
|
MD5 | 78d592deff7e2be4deb0acaec21edcb2 |
|
BLAKE2b-256 | 9870e3c9dcdf838b6ea59643e6f9aaedd220a8632b225b8c5ec048bc4782fa68 |
Close
Hashes for pi_heif-0.9.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5805771f1fa06b181210a591604be675db8563b09e1e2041ed7fd779bdd2a49b |
|
MD5 | 17048ee3021e06f2b66636bbeff19bf6 |
|
BLAKE2b-256 | 27b7c8332fa655c34cb13b3105c8a57e5219efdb46549441d1f5bfb9ba5bd9e1 |
Close
Hashes for pi_heif-0.9.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9b709760c0e254cdc11730598e9d2d1c9e0da7581d3c885eb35ac9476b54c1a |
|
MD5 | b04b788a93601028242638df3d0c382f |
|
BLAKE2b-256 | d9387b15b0651ba3dc6deb76c95a604566b1de9c91d9b89f84b2b5ff4d3b6be2 |
Close
Hashes for pi_heif-0.9.1-cp38-abi3-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfb3150b1a53b62c7c3a691d31ad50e0972af72d59a92648e7b60b974459b529 |
|
MD5 | c63a748c2b397bf18549ee42bb8342c7 |
|
BLAKE2b-256 | 981690674fb57735fa9f9b9beceb5f686cf81c2bfe535fd64ffebf3f28629b47 |
Close
Hashes for pi_heif-0.9.1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f76d34aee2b912359a072e774925f126a3d4afb6a7299804204eafb9494254b5 |
|
MD5 | f1fedb6ba732366d4b3270bc5206c414 |
|
BLAKE2b-256 | 2a0936a1be1c42095d1042598f77e000b4178c68866b03b7a88ec34a5be775b5 |
Close
Hashes for pi_heif-0.9.1-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e85bf5ef048e9a65aeb5548790970cfca40df120dd4d7679301d9a762b66987b |
|
MD5 | d23b32fcc275f0c5a1d279fc9a02516e |
|
BLAKE2b-256 | 7bd92ae961b683ab46bb81077cc7fcf8bc9f120e19e7ac38a71bc16c3f82a070 |
Close
Hashes for pi_heif-0.9.1-cp37-abi3-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3867448a536b1f9e0b59a352b05ab37325d95bcda3cbed135bbbc0f7c1a4d3f5 |
|
MD5 | bd2d5e08f89d5fffd8bb018bb0f17623 |
|
BLAKE2b-256 | 9c3dcb32bf6e8de82d34b7e2b0ea13070279f58bb6db91c6cde3715d83a22d57 |
Close
Hashes for pi_heif-0.9.1-cp37-abi3-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 966549dd1d9084941ab51de69af9f8e88944fd7ee05a92df3c796a6b4556467d |
|
MD5 | ddcd904f6834eda634b915f100807c00 |
|
BLAKE2b-256 | 8fdf5441ff681e5061da0c7affd460dac65e8b969bd81ed10e69009535660db9 |
Close
Hashes for pi_heif-0.9.1-cp37-abi3-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59b0cc1624b8e1b5298d8015342284b0ff8884902cef6ebc78a5d3a6947f3403 |
|
MD5 | cb6ab5522f45646409e924fe041d76fd |
|
BLAKE2b-256 | 1979ac676b47eb3a1b3861c18c9eb76834458594ad6f80c5e2f94173cc998f15 |
Close
Hashes for pi_heif-0.9.1-cp37-abi3-manylinux_2_28_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 220707b8a11e80de60b1e915356c9963a259abef31a08aa2cb9904cb1056a82c |
|
MD5 | 1d4ec95ad8e867a41404795273df2efe |
|
BLAKE2b-256 | aed62bf7b6c9d711f52758f0d6f02f9bd8c7c1f67fe0c05c89fe51c5963e3f97 |
Close
Hashes for pi_heif-0.9.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2336539936b4aa141b1c7d7b0e2075004bc9510216591aed52f959e68e4f0ca4 |
|
MD5 | 8603832d8aa19a67c0682c7173a76543 |
|
BLAKE2b-256 | f4e3334c0d660d24513868ee0c06fe28a4de4d764c76567a38311f4d8d5d3376 |
Close
Hashes for pi_heif-0.9.1-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2531fc946c074f777d89bebb65241dc412264199a6fefaa3ec66f714fa3ba73 |
|
MD5 | 760898c77ef940967b25e483426beec6 |
|
BLAKE2b-256 | 4fbffa8430724c91105588e25651c31d7bbc56278a4a83f3c95050086c5bf942 |
Close
Hashes for pi_heif-0.9.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b48b167fda4bc9dd78be9f50f989c49e77240ec3d2e5103b136007561cda6cc1 |
|
MD5 | c60c64d3e50716db17c5ab2483007ead |
|
BLAKE2b-256 | 63e7eb0761f143c503f3ae4c49a4711f13d0c3914c0973f90764175411910bd9 |
Close
Hashes for pi_heif-0.9.1-cp37-abi3-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba63845d749b86cb0d940b7ea77cde5495db855e686947ccbcf7a532d08b8b38 |
|
MD5 | 856f6f497da29a16163fd06dcafcdc02 |
|
BLAKE2b-256 | d88d898563d6277f02bfcb891f640c596f5cb97101d3bc296c77a516cb584865 |