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.3.tar.gz
(8.0 MB
view hashes)
Built Distributions
Close
Hashes for pi_heif-0.9.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fbc268edae40ec4f21377996b57aacb526039998e734aeded643958c57faeca |
|
MD5 | 583f211e5f7d36832eda76844bb4bb3b |
|
BLAKE2b-256 | c7a81b22c05646f68f5dd204a8a27b66f1e6f81e2658e4cf7c4fa5b7eace7ceb |
Close
Hashes for pi_heif-0.9.3-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59db227a5263f044947d4fe98a2361013de877a9f73cdab6a458b8e11a635d20 |
|
MD5 | 87ffb15f20456980b64185ccfe27344f |
|
BLAKE2b-256 | c1e59402654d2692143dc9db0a90e92b34141a0d75f80aaaf6dc3f757f122dab |
Close
Hashes for pi_heif-0.9.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc987e2e7bcb590ba31dfa01eb2c9b91ada368cf1883bcff3c64b43b7e9b1844 |
|
MD5 | ea3516879d8d8cf1620e49538cbf4232 |
|
BLAKE2b-256 | 3a30c6bd8b0b928ecd04fefcf41dfabbeccde779321ecdeced6a845df17a9a2f |
Close
Hashes for pi_heif-0.9.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41541c79b70fd17956acc8801dca94ee2a86674a8086da191c64ed875a876953 |
|
MD5 | 302a15235373b26179c896035588266f |
|
BLAKE2b-256 | 61e2f89c220b75e753dd3eaead830f533d7e52121ae12161e035ad2d0b567cd9 |
Close
Hashes for pi_heif-0.9.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c92f596b6b04c38e3e59b5c05b9d666df37dafaa704cf7ea203e94f6d068e29e |
|
MD5 | 6f15747f70a358cfdee22b3044287c1d |
|
BLAKE2b-256 | 5e2ce2897be35d01b0f61d972fd12daf6cddeec1c44591933f152d7a5cf76229 |
Close
Hashes for pi_heif-0.9.3-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f494180623c9c496691961c505d3ef7750229c2d882e88a7de19f4c9efa130ba |
|
MD5 | 3e490a916374a619522ef8590317ac6c |
|
BLAKE2b-256 | e0f55867b6dce9b0f28b5911b6a37c7161caefab5683d9744678ba05242323f6 |
Close
Hashes for pi_heif-0.9.3-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5373de594289e4bb16ae92125b9725da806850fddd5dea3374f581b596502b4 |
|
MD5 | 6a676b4b5867fc3988ab3d7c6b523505 |
|
BLAKE2b-256 | 9ad0d148f5a96d13cdd9ea15699f6f50cbbc4e64cc36a4fac2a6c35641f1e4fd |
Close
Hashes for pi_heif-0.9.3-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c030e9d7ee220464219dd24a134847dcb6cc68377188760bbc362a37a1752da5 |
|
MD5 | e97504345c7d2e97d81766b8abe6486c |
|
BLAKE2b-256 | 372fe90e821c344aee8f14447cec46933e89ca5a026e69b5e9b0e890ba5283db |
Close
Hashes for pi_heif-0.9.3-cp38-abi3-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b6c89621117442c8dcf558e187c9d3e07cc46391faf3e22fc3f2aa05aae8afa |
|
MD5 | 3113bfd5e381d8851e711719f6c8bef0 |
|
BLAKE2b-256 | 80ad6a8e385ebcb0c37c19916aa7352348bd11e8106e2e0ac127cdaf4ac581cc |
Close
Hashes for pi_heif-0.9.3-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d03fcdd7c8cbcbf9c253564cdf82b0567a9dd71050cd24400726e330b2abec6 |
|
MD5 | 45983ae5d470effacc72cf97387611dc |
|
BLAKE2b-256 | 7b9132c038c617a89f434f045a99e9a8d5067c24fbab654f57891ee57f15ced9 |
Close
Hashes for pi_heif-0.9.3-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8289c7707064deee6f329e651c09b4924d3786da337622c22e4ba657671b0e66 |
|
MD5 | 0fde7ae33373c97b141d56d779f43cc4 |
|
BLAKE2b-256 | ab4854e4a6b5eafc3e67fa800c609e6b8ade2c42cb263a91c350f22ac3d344be |
Close
Hashes for pi_heif-0.9.3-cp37-abi3-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 463b79a410ee2a99d3682b314967e62c825db24b5a974ea44c7c09966acefb0e |
|
MD5 | 7fc80e9e5d848f38b65e8b00f4b2b9f6 |
|
BLAKE2b-256 | 375479984b9277e97caa5b92dbff0129fd1f737aced02157e536faaeaabb37b7 |
Close
Hashes for pi_heif-0.9.3-cp37-abi3-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8a64320a4690b77e812f07ce7593435c1321446064f8e010741ee857eb72df1 |
|
MD5 | 315d0515b7051c3a365e3bab9973d2eb |
|
BLAKE2b-256 | cde79aae5e3b13c7f38ff340bc56fe4c465a6b78504eb4f158875d358775ac67 |
Close
Hashes for pi_heif-0.9.3-cp37-abi3-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fbd09143eef2e4c649604084195a6b1a25bf8160ae9c12a9a6400b78771f6b6 |
|
MD5 | 4e2969df1ebbe7a4ec21e7e88cc1a8fe |
|
BLAKE2b-256 | 6404b35270ed79095f15e69346240504380ef0b2c9b0e45676459d69c58b4967 |
Close
Hashes for pi_heif-0.9.3-cp37-abi3-manylinux_2_28_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6e8c2ef55d5bd61595c1862de9efe2b5a132c9c757bad9d7352a00f59cdfaea |
|
MD5 | 242699138f207b015ab2ec6dd0217cca |
|
BLAKE2b-256 | e028e7dc97eaf0b6bec6aedd260c8e967476507bcfe9844cd864006bab5798f3 |
Close
Hashes for pi_heif-0.9.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d08d73ff46838cd80287019bc6616731021639d5f9ac54d768089566a79826d8 |
|
MD5 | ff929d3f70608887c1af4836db2e54ea |
|
BLAKE2b-256 | 8fb8c4b9cea8ffe18ea4303b9a619a9f89e2434c9617d0eac0481c578521ea9f |
Close
Hashes for pi_heif-0.9.3-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d6f6c09af175a0571c9145e50fcf70e4577b9513b94b9eff31c30d229ea6be4 |
|
MD5 | a69b7676727ed761443261734466b21c |
|
BLAKE2b-256 | 1e18af4741c8d967bd66b43eba7261930e1eec11f97c0a4862096f6cad923389 |
Close
Hashes for pi_heif-0.9.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54e608cc0c36969fa145a5b32f77643884075c0ed7be9ab61a5e333d490efbf4 |
|
MD5 | f4bb1edc41634679fb64d0b5b29cdc40 |
|
BLAKE2b-256 | 528050e1339fa7580accbbe67e9fba79c6d3b9fb0647507c577d723f226c5ebf |
Close
Hashes for pi_heif-0.9.3-cp37-abi3-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5eb5ae461eec42f537893b34c38101441075af5e606030723381d63b5e8bfafb |
|
MD5 | 49d6f1c880fbd04db04a0f82cfb56374 |
|
BLAKE2b-256 | c8a2799aeeb6b0074df08f9fb4200320808bf337ec2dda3fef7521bb8d5d9ac7 |