Skip to main content

A decoder of HEIF format of images

Project description

cykooz.heif

cykooz.heif is simple python wrapper for the library libheif-rs.

RawHeifImage is a simple wrapper around low level HEIF-decoder.

CHANGELOG

Usage Examples

Read HEIF-image from a file:

from cykooz.heif.image import RawHeifImage


img = RawHeifImage.from_path('data/test.heif')
assert img.width == 3024
assert img.height == 4032
assert img.mode == 'RGB'
assert len(img.data) == 36578304
assert img.stride == 9072
assert len(img.exif) == 2026

Read HEIF-image from file-like object:

from cykooz.heif.image import RawHeifImage


with open('data/test.heif') as fp:
    img = RawHeifImage.from_stream(fp)
    assert img.width == 3024
    assert img.height == 4032

Also package provides an opener plugin for PIL (Pillow):

from PIL import Image
from cykooz.heif.pil import register_heif_opener


register_heif_opener()
img = Image.open('data/test.heif')
assert isinstance(img, Image.Image)
assert img.size == (3024, 4032)
assert img.mode == 'RGB'
assert img.getpixel((100, 100)) == (73, 74, 69)
img.save('test.jpg', 'JPEG')

Installation from source

System requirements:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cykooz.heif-1.3.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cykooz.heif-1.3.0-cp313-cp313-manylinux_2_28_x86_64.whl (5.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

cykooz.heif-1.3.0-cp312-cp312-manylinux_2_28_x86_64.whl (5.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

cykooz.heif-1.3.0-cp311-cp311-manylinux_2_28_x86_64.whl (5.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

cykooz.heif-1.3.0-cp310-cp310-manylinux_2_28_x86_64.whl (5.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

cykooz.heif-1.3.0-cp39-cp39-manylinux_2_28_x86_64.whl (5.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

File details

Details for the file cykooz.heif-1.3.0.tar.gz.

File metadata

  • Download URL: cykooz.heif-1.3.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for cykooz.heif-1.3.0.tar.gz
Algorithm Hash digest
SHA256 33b8463b05c34c611beba1ac7493a713e060f429607b65746f0a69081b72c0cc
MD5 88c2cfdbaa99edaebc23bec0b129ab48
BLAKE2b-256 b9a0ceea8c9de80ede79267024f3cac505b4b4875363e213e3426288fd57c334

See more details on using hashes here.

File details

Details for the file cykooz.heif-1.3.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cykooz.heif-1.3.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a5dec6c334026c63246d70b55427036b2ac26d3e702706e0702414181e4f0bc9
MD5 3c9a73a7188e5abfe75f467fbc081a75
BLAKE2b-256 f6a61b8fc2500c950be2c8ecd326085634542f22ba7b68c521f3e230b01bedec

See more details on using hashes here.

File details

Details for the file cykooz.heif-1.3.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cykooz.heif-1.3.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 53e5c7da05c418e70a3048ebe1d46b841980a7ddfca05675f4bdac8c79518065
MD5 f1931fcea0295ea912234d1aaa884ab2
BLAKE2b-256 1bc758085f032c07b23ebfb97242a9bfee14a1d55c8ececf82ac51b94fc68599

See more details on using hashes here.

File details

Details for the file cykooz.heif-1.3.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cykooz.heif-1.3.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3313d5f3411f2c9349721664263632732c59930806c19a73a104d74c489b5ec3
MD5 1542e9720b1c9ec90d6394d14c91ce3e
BLAKE2b-256 6c429d4b2691a978191460ace617cdc185a20bf584053b1d14680fb700c9c3cc

See more details on using hashes here.

File details

Details for the file cykooz.heif-1.3.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cykooz.heif-1.3.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c1cf5e5676308b7225f830afe70b7b00f9f3bc0b3f37ad930b521158df2c7973
MD5 de5a5d071df0803d35d9527993de88b9
BLAKE2b-256 c9958f83416d227d6beed7e8e52973126a38c57774b213eed1f60cd602ce6d41

See more details on using hashes here.

File details

Details for the file cykooz.heif-1.3.0-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cykooz.heif-1.3.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0e18c86eed4ed8e5f95d386aafe5d2baf6462bbd9f93f55fd8a09e5aa582a574
MD5 8b2b1f4ba51fa025749a8f91f7fb8a5d
BLAKE2b-256 b46208306e06bbb98f82010577b7206826d714dc6c4c575287c56f6054967853

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page