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
) 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.0.tar.gz
(8.0 MB
view hashes)
Built Distributions
Close
Hashes for pi_heif-0.9.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90be1fcbf690ab4121ee089ede565e99f9466c4e53089cf1692b3d2750474ac2 |
|
MD5 | 154a9558bb809848f1a6741bda69902f |
|
BLAKE2b-256 | 1bf4ec922eb0fb4463e3a141d14bfa08da3bbca37b41257a2b4aebdc7ae15375 |
Close
Hashes for pi_heif-0.9.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 176b27097fd2a70342968e0b487c3d0a971f660bb84d1a5bdcd61198816d04f8 |
|
MD5 | f0af4d3a4460ba854de16b381f4e703a |
|
BLAKE2b-256 | a5228533308a81d5169a2d966a2213bedf20580ea74506644b4f9f7c8b7a3aa3 |
Close
Hashes for pi_heif-0.9.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76ea27a874e47622feb67abf4ab4c294f5565772e69c0b120c997feb871e8281 |
|
MD5 | f7c40520c8d138fb2e7d1b0587a05e4c |
|
BLAKE2b-256 | 66eae6612677aed23d4b5370ce731a949a581dd3ec5daf0f0535eb8abe9bd318 |
Close
Hashes for pi_heif-0.9.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfb674f20c9c126d8f03bca73c574d004dc4deb7af37dcbf93abfd6784e41b59 |
|
MD5 | 701df42509b80745dbbb1b68d8b5e507 |
|
BLAKE2b-256 | 921bde9aa959e117bc303a5e3e2cf9ff3649247541221b92b657c7ae0c2e946f |
Close
Hashes for pi_heif-0.9.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c663afdb1cdb95d7b0d340263e2ae3c89e16789366050772aba8e002e65fd1b |
|
MD5 | b301df06d333cc0f4e799e28c5d6e09c |
|
BLAKE2b-256 | f4f0d387633a5c51b22cfbbac4d1d868025a460ff922ed64e0a246578075e704 |
Close
Hashes for pi_heif-0.9.0-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8586473f891c9e55da4d3b80fc3ef1e721fb73119fc352edd565c0fc5cf89b4 |
|
MD5 | 4c911e7e4f9da24690e93d843a429398 |
|
BLAKE2b-256 | be3d833c95f47280d432ca385f268d2d8497b7c74eb1cf9e89dbb242b5aa3512 |
Close
Hashes for pi_heif-0.9.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 385399dbc25c3208ae664d089e1acf1a8277784b93caaf776daee0f7e5297424 |
|
MD5 | b6771caa2dd748b343b74586e1e7f93f |
|
BLAKE2b-256 | da3ada4027a1b4d11047620b4cbaf611086318e9658e4c2eb21c7e6cafc37e3a |
Close
Hashes for pi_heif-0.9.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10a5edcde24749fb628d8caf5d12ef435fecd36fdd5ab0ca8e02d1bedfe33efa |
|
MD5 | 4a0756de9f068505e3d38f896ed0800b |
|
BLAKE2b-256 | 2c3db2bc31912bed9c30af8d934cfb89b5896ed71ec7e4f33671cb17bbff30a9 |
Close
Hashes for pi_heif-0.9.0-cp38-abi3-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24775ee626bea1e0a7de66aa5a399fe03608b5c8d8103228ad17af332841be5a |
|
MD5 | 42ae34c6b9cfba25695d14df4e197027 |
|
BLAKE2b-256 | ed228073e375939bb5228888a2d46f7235b04d26b5cbba47629391e5b87ae5d3 |
Close
Hashes for pi_heif-0.9.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5194a85a6fa0b682be5e1a603c02415eb6af5da9567057d82ece6e722aaf13c1 |
|
MD5 | 266570ef9df97c6a4419f878c2a61ece |
|
BLAKE2b-256 | 1b312dc792a99296b58e155d7983c14488f03e7d9c50f9cf9311d607db88ed76 |
Close
Hashes for pi_heif-0.9.0-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8b43d01986019d3b3deedd8f49ff7045985aa869bbc833ab076c76fabd5ff11 |
|
MD5 | 15acf5291fc8bcd8035d84b9dc17c905 |
|
BLAKE2b-256 | 56164bb296f7348069ff8e1b0863663add6143509ce9b6f3a6a5b8c2c0e6b670 |
Close
Hashes for pi_heif-0.9.0-cp37-abi3-manylinux_2_28_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86908a3115cf9203b85987367810ab4622e55ad5e9cceed19e2506c14004833b |
|
MD5 | 7eeb021bd998d14a382e5924b9bd354f |
|
BLAKE2b-256 | 03458061796c20288b2d2c2273613be9b09035c446acde780a3ecc622c8f0a07 |
Close
Hashes for pi_heif-0.9.0-cp37-abi3-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdcebf36f65c9588063e2ec81d34cf1febf48130fb491ade166f155719cbff86 |
|
MD5 | 2fc14f06d39dce190a93531962db368a |
|
BLAKE2b-256 | 8d26a57e8f29a2c9a4a91a8eda305359ab7a477999f677a46b59fae21fd0d9c5 |
Close
Hashes for pi_heif-0.9.0-cp36-abi3-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30d95ff1e3fffb9c92129a8569171be423e14eac270f78f55b5d4c6bb41bafd2 |
|
MD5 | 90ec66c1b1143f9d345e6fe4936952a0 |
|
BLAKE2b-256 | 3e27d3bec1f8ac3f55d9e0f306b48d957744d56e6992aef448197187cdc79f13 |
Close
Hashes for pi_heif-0.9.0-cp36-abi3-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38aa363b858495b797f6732cf7681fcd3ef917de97e30636a73f8bed8dc9bda2 |
|
MD5 | b68282920967a46751d16d0daa99d6f1 |
|
BLAKE2b-256 | 3765664c432cb4bc35182180029c5d7bbd1cfeb313d890f77d210c98c1cbbc11 |
Close
Hashes for pi_heif-0.9.0-cp36-abi3-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f179a8835de84e77645b6cbd29fd3e9e19be6e3efdbad0690eea38982b3c8ec |
|
MD5 | ea81abee711a50324ae9977fdc02d838 |
|
BLAKE2b-256 | ef8f489f75a4fca48393f46867476e5a99cada3410181899c217b6a8e8db18e9 |
Close
Hashes for pi_heif-0.9.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 176bbe5845da164f628d2f2b2e2bf249497efa7fbe194becf9dce9b5ac1ab06b |
|
MD5 | d55c351bc88e123b3797e36b8b0338cf |
|
BLAKE2b-256 | 779ea23636b86369774f17945eee36b58dd2c0bdcf590a9b1a31ca82d8c660d4 |
Close
Hashes for pi_heif-0.9.0-cp36-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76ce5cbc7038f5dabb92bfd3e072999db3b21bed505ace12e66a109fa42a9db9 |
|
MD5 | 4fab4c6fc06b3b4c3c31b4467bf55c7f |
|
BLAKE2b-256 | eef70b62e64969111bd0172fdf011fc1341bcb854134efdffc700834a554cbe1 |
Close
Hashes for pi_heif-0.9.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3dd867dec62fb33283ee9ae2419e669e32254b1072fac441ebc37da47bccdb0 |
|
MD5 | 0a9a02ace2814b8b3a7d80c3a5041eda |
|
BLAKE2b-256 | a15abc9781e424c07e6669b7eda32dbcda647cbec9f91b059eee745203a272d0 |