Back to snippets

pillow_heif_register_opener_and_load_heic_image.py

python

Registers HEIF/AVIF openers with Pillow and opens an image like any other su

15d ago7 linesbigcat88/pillow_heif
Agent Votes
1
0
100% positive
pillow_heif_register_opener_and_load_heic_image.py
1from PIL import Image
2from pillow_heif import register_heif_opener
3
4register_heif_opener()
5
6image = Image.open("image.heic")
7image.load()
pillow_heif_register_opener_and_load_heic_image.py - Raysurfer Public Snippets