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.2.tar.gz
(8.0 MB
view hashes)
Built Distributions
Close
Hashes for pi_heif-0.7.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7228e43205bc1230b702e087601c4557507507a9cd78099faf240e5734a2145a |
|
MD5 | 7f1d237cda9c693110e940adbe9ef162 |
|
BLAKE2b-256 | 88970bbd8898ccb723c3cdbd0bc3e7dcd912d620b08443fc2b41128d9083c975 |
Close
Hashes for pi_heif-0.7.2-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bf540aaedb4d13edb334ce702e800325c8b25850c9a4a543f3906f24208352b |
|
MD5 | ce5c6ef6b87fa91ae015cc43bb82f4e0 |
|
BLAKE2b-256 | 0de165ac048fb2dd32f068ad9dc2845fdd904295ed5b69b6736dccc9c801c0e1 |
Close
Hashes for pi_heif-0.7.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba7eaf0870721e38667878a84b96b3ea6f9039bc9690faeca0881b43fb0d6615 |
|
MD5 | 883f01ed2629ac35c342fbef7439c282 |
|
BLAKE2b-256 | 39f55db9d6cfde398fd68900d1127d2f1ad1869e2e3c2f906cb45beebbd9e56e |
Close
Hashes for pi_heif-0.7.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a9e823630a2eeeb8b33fcc0993ee736e036a3df76eb1b9504666144596de8e7 |
|
MD5 | a08736f1d27adf7b4b74dd206a6aecee |
|
BLAKE2b-256 | ef3a751a6663c3dbb9328e6c781a6090d691be5045a572e826a14c38b1560f6f |
Close
Hashes for pi_heif-0.7.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 192794eba382179784418c90a3eaac76fa5ee8fadc8743b1bcf9f33335d107dd |
|
MD5 | f7624d5bcfc05be9a6a8c9529b2b2a95 |
|
BLAKE2b-256 | d4cbfc5aaef2a0cc8d781a30ab5199a72c4ab62896cb6860a039a7d1dd64ca9c |
Close
Hashes for pi_heif-0.7.2-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba9169b52649bba2994decc519f785fa3a34d7b85174e426da7698aa21f8ed04 |
|
MD5 | 4b343ad32bfb7a717352c27a1eb4744b |
|
BLAKE2b-256 | ed3518f9d9ba5f05ab04a667f2a25987362fa250b88761a2a6c458818c208cc2 |
Close
Hashes for pi_heif-0.7.2-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97e3d7699ad871aa5dc97bb693168d2aeae90bcdf1937c15126a87d94194ae52 |
|
MD5 | 349da8d0f80ec9d3ec2a5612fac02151 |
|
BLAKE2b-256 | 1be68765f5367f33505a266a07dde592ff09e10b14ded27d1a9e7eeed05c5c79 |
Close
Hashes for pi_heif-0.7.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a007b77ac0096149dff0c500ac9afab33818ad37e96438c43b0d643b46395eaf |
|
MD5 | edbdc4621be12490d9a1f3dd1f8aa037 |
|
BLAKE2b-256 | 0689d0ecfce5eb0eb8805c4818c92baf3d59ed10109bfc17c1566aa26263c510 |
Close
Hashes for pi_heif-0.7.2-cp38-abi3-manylinux_2_31_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd2a63052e51ca5dd72235c07a5e899f68f1d703709434e42f43cc111ded2ded |
|
MD5 | 835179a6fdeaa8775a5f2e292e52f8f7 |
|
BLAKE2b-256 | 6609b0fed6fffc3c1bfbc3e0ba8c6f9d1bcfad98507ccca2cb23866d40b03266 |
Close
Hashes for pi_heif-0.7.2-cp38-abi3-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89e5d6a75a6e32638693aef6dfad52f344a06e122eb6da061b4e0c688c42c8c8 |
|
MD5 | 8ce54e4764eafb4437c5791feef9f2d4 |
|
BLAKE2b-256 | 6cc3812b3cd5f6c39f40981a9648ef4867cba871d3c678f47a06bca53432fff6 |
Close
Hashes for pi_heif-0.7.2-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e886d0004f67e4fd9a5033739019b645ef50b4592dcef511750bd00f5b1b268 |
|
MD5 | 8bc7b34de8d416bcc47dea63af9de29c |
|
BLAKE2b-256 | 30c7c1a1727bd7d9b1a656cdbaf4fdc43d0f99dc8d5db2839d798429b06ce0dc |
Close
Hashes for pi_heif-0.7.2-cp37-abi3-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cc7aeecb5233b25afeb2c0dc6f8dede0a59529a4506883a86bf7d90c73af7a4 |
|
MD5 | c0921572e791c511c3c4a5c0c81325de |
|
BLAKE2b-256 | 324c2d3de70017cb298315f0e6a86132f9d1de45651d967821dc791e09c2ebab |
Close
Hashes for pi_heif-0.7.2-cp36-abi3-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3ffa39ae0ef192e909056b22e3c5eedfb51ec0fea299fff0d72c964367c8f0b |
|
MD5 | 52564fdfa83d8b2a7edf54fa564cbfb1 |
|
BLAKE2b-256 | 72d7da670c93d8e45f1ce6d3f8d93c08719405a86d61bd91173e82ea3c81409c |
Close
Hashes for pi_heif-0.7.2-cp36-abi3-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a99ea3e96e1fea4611abee1d0d26eebf338a9475ac2b64429c2e753098d06d2c |
|
MD5 | 15bb458be21b098020c23e57f8a988ef |
|
BLAKE2b-256 | d08e3934f7f41263679c6fcebad247970d3bcfc9da8c1f7287afc20a87aae5e4 |
Close
Hashes for pi_heif-0.7.2-cp36-abi3-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81d02681772a2310b1d1410a43cac854fdcc835ac5172fb103e614d2c6960427 |
|
MD5 | 21be8a3d23a154c7b70110d6d2461511 |
|
BLAKE2b-256 | 86ebfd71a922b8fc013cd299c72685f13caa58c17e6befcc390af83ccb786cc8 |
Close
Hashes for pi_heif-0.7.2-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47a573c743028279037e1a98c759fc14d531e031204d2745b77d0699b83c1630 |
|
MD5 | e6173e4f2fc44ccb8ddf63a69aecc611 |
|
BLAKE2b-256 | 7bbd0445ff30dbe37c326524cc294d4387be556499d7d9f51bf4fe9fb5f7842e |
Close
Hashes for pi_heif-0.7.2-cp36-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd02fa0eb3910dc18ba4e57e011adf9910f20b53a8d3718e9785c6bab6402c19 |
|
MD5 | 282e8f027ef434b353ba878dc850d30e |
|
BLAKE2b-256 | f9e377205af46d86ad9a1c15234277371f566a6bfbebebe8c612c3cc1db88599 |
Close
Hashes for pi_heif-0.7.2-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ea11268ad56178deacdd45acb1e76047a8c3b1a95f58dd2fb87043a466dda77 |
|
MD5 | a30d561582db42c5ff4c02e3f1442690 |
|
BLAKE2b-256 | 49b53f2025021eb55e2d3617fc2fc84fdfbd432816c7609ff3583b14666666ef |