Skip to content

Commit c17eb8e

Browse files
committed
Replace pillow-heif with pi-heif
1 parent a90f38f commit c17eb8e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ numpy>=1.18.5
77
opencv-python-headless==4.10.0.84
88
Pillow>=7.1.2
99
# https://github.com/roboflow/roboflow-python/issues/390
10-
pillow-heif<2
10+
pi-heif<2
1111
pillow-avif-plugin<2
1212
python-dateutil
1313
python-dotenv

roboflow/util/image_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
import os
55
import urllib
66

7+
import piheif # type: ignore[import-untyped]
8+
79
# Third-party imports
810
import pillow_avif # type: ignore[import-untyped]
9-
import pillow_heif # type: ignore[import-untyped]
1011
import requests
1112
import yaml
1213
from PIL import Image
1314

14-
pillow_heif.register_heif_opener(thumbnails=False) # Register for HEIF/HEIC
15+
piheif.register_heif_opener(thumbnails=False) # Register for HEIF/HEIC
1516
pillow_avif = pillow_avif # Reference pillow_avif to not remove import by accident
1617

1718

0 commit comments

Comments
 (0)