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.1.tar.gz
(8.0 MB
view hashes)
Built Distributions
Close
Hashes for pi_heif-0.7.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eecd0d171190836f63052a0bcff1ba00435ef78d68cb2a6809edf22e6708297f |
|
MD5 | 3a3719f5f6e3c3890b3b8ea58c98cb2b |
|
BLAKE2b-256 | 4427631b395e42c253b0f5d4c50b2868006a315049e0a1b90457de35ec47522d |
Close
Hashes for pi_heif-0.7.1-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38afef09816f155e8452c49ae69f18d15813a6eaba8a1435afc32e72f3de6892 |
|
MD5 | 5740b0e3d2f837fc46ae4e0c2215aa33 |
|
BLAKE2b-256 | e1343f708938b3ec574b8dede32059b3a70542c3595a7e1f88da90481204ea03 |
Close
Hashes for pi_heif-0.7.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d3d735a1b892427f223e450287cf33bf7da54cbed5bf30c5388eb1f4be6badd |
|
MD5 | f55444e30b1b53896b107fe01e5c409d |
|
BLAKE2b-256 | 5426c9793575a8002de4a870ea122c19f1539c37ffd4db73c8a5b91fde37b8b1 |
Close
Hashes for pi_heif-0.7.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3fbcfd3301ce14f4b5ed3d17dfffe2570343c63256bff84ce5207e103c4e66e |
|
MD5 | 601491a7fadfd0f432c6d8732faaf44d |
|
BLAKE2b-256 | 37083e47166cd93213e9638eb78237bd9924f8dfd66ae50c3776b19fbd99869e |
Close
Hashes for pi_heif-0.7.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f99b0c35894a4c0784b3af391bd1bd648191055f2660384c31ac5c22d76f589 |
|
MD5 | ba020e82dce99c0892a8c85170c3fa2c |
|
BLAKE2b-256 | b2e400dd9d0b68df2183f31b7b652b304c294334b08805ce40dbc0fb4b55e26c |
Close
Hashes for pi_heif-0.7.1-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb776357eef17d00ece4dd06f1b1e811b8014004dcc32455282eadb083f2fdbe |
|
MD5 | 3b48d5ff0d4d999c62c2597b266dd2b1 |
|
BLAKE2b-256 | 857ff6ed0b0456755ef3f1629b063ab37a310bc7b9d88deb74a9fa0baf20e767 |
Close
Hashes for pi_heif-0.7.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fe51e50718d03d3d0950cf2fda54c33c7699115ea85219346f328e387d9b137 |
|
MD5 | 2863f4910c66ca833c6fc607e1b60978 |
|
BLAKE2b-256 | 396a87b7b5befab7cdf6f6e6d09f6c076e8c97a6f3d0de85aa9a95a5f0b23336 |
Close
Hashes for pi_heif-0.7.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 375b9e760fff8888774bdea269fa0b7309655084cf8a56c3e0789fb33d195d66 |
|
MD5 | c94ac0fe457bc18a03b4d858dfa036be |
|
BLAKE2b-256 | 4f83355055f445ded95751f1b41ecc83a2b20c370505e1cabeeae6defaf8e213 |
Close
Hashes for pi_heif-0.7.1-cp38-abi3-manylinux_2_31_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70dc6003509d9836db22a82afdb9c879ddc5dfa21bb61977fafd428b07442644 |
|
MD5 | 66d0267766474126d277035a19570dcf |
|
BLAKE2b-256 | cda804b732b42801adf245a1639ca756d7cbd671b8b8b438728d4a20f8fd16f6 |
Close
Hashes for pi_heif-0.7.1-cp38-abi3-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c27b6f9c316d3e76b3594a8d492a8db7f4623da232cba72e02ad2fb7ee88b3a |
|
MD5 | 86d20a8dbfec659ebd0f1a8cf22cfa32 |
|
BLAKE2b-256 | 00fa5621d23116cb9f3b88d3813fc164e1429f6cf2b25aaef722d1a9044a1214 |
Close
Hashes for pi_heif-0.7.1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37a0443df86298ff25a18b8f1a08c673550725592499f3c22e99a95bc4c41118 |
|
MD5 | fd2b3a71832e32c6acfadf78068816d7 |
|
BLAKE2b-256 | bda78f7467005e4545c22fe478e9e06163cf1f094aaad748b5633a672e8079da |
Close
Hashes for pi_heif-0.7.1-cp37-abi3-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13b30426009b6f0c7ba8248788053cfc414d26be8dfac80041508075e0e256c2 |
|
MD5 | 0bd2e58adcf9d5bd4db87f75d1be76fd |
|
BLAKE2b-256 | b13967aea82cf7e7f41b4ac13f0f07fd03e78a2cf111e407626249bed7c09b2c |
Close
Hashes for pi_heif-0.7.1-cp36-abi3-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67805e4e37d3d322e39f696a37a695ca1b006a8fb6ace4d54657c09e1194cf84 |
|
MD5 | 4fe05ed9e32260b941e35095d0ea954d |
|
BLAKE2b-256 | 80ee5d8830c57b312a8320f8700b0810f333688f16c6eedfff105f3b9d746b70 |
Close
Hashes for pi_heif-0.7.1-cp36-abi3-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97f4b069d9da9cbc2700a3c0066c2687ba58e9af854e52d1e7590c5e6237a67f |
|
MD5 | 9558f6bd334f6ae896ee615952809b19 |
|
BLAKE2b-256 | 15ddf99cf148ec93bba7880813e2b34b51db6569e631541ab9f300a7cc47bd4d |
Close
Hashes for pi_heif-0.7.1-cp36-abi3-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 810a2e6b19cf0c5814adabec76800d9a7f55cb7985974c096134c04ccf2796d3 |
|
MD5 | e9fa2cccb619c62bacc82842ed665251 |
|
BLAKE2b-256 | 00949d4aa0e7e989436676f9333d6ff20f049d40da35e1ad00ea42f95b6cd4eb |
Close
Hashes for pi_heif-0.7.1-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6cfed161feaec2988e612d1dbd7b1582b04326cbcc23f5879a49df798f5b38a |
|
MD5 | 9625d5f599fbab97c7bead0bdc1eba89 |
|
BLAKE2b-256 | 66f4f49ea382ac868f9b29c726d7ed2dda88d86622ecf20bd998ed7f051f4d2f |
Close
Hashes for pi_heif-0.7.1-cp36-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70fcb6c81bf51b105e56aacb31a2a1bf44a684fc2f3b5a0329493349d37da406 |
|
MD5 | 3b427959eb81210d6a55d04edb8483c7 |
|
BLAKE2b-256 | 9fb5e714970771403c6f211762888099d80ebc0ad9665ad6315021dbd1161099 |
Close
Hashes for pi_heif-0.7.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13ebd044b958df1284e7cf4bc990733996e5f5f9703aba5be6dc70518712cbff |
|
MD5 | 53046e78fa54d9ce64652772b8186c09 |
|
BLAKE2b-256 | 56b36534075d89b4705eca00716c5fbd25044b7eb620febbf548924e2bb27030 |