File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ dependencies = [
1111 " numpy" ,
1212 " packaging" ,
1313 " pillow" ,
14- " pillow-avif-plugin"
1514]
1615requires-python = " >=3.9"
1716readme = " README.rst"
@@ -34,6 +33,9 @@ dev = [
3433 " ruff" ,
3534 " pytest" ,
3635]
36+ avif = [
37+ " pillow-avif-plugin" ,
38+ ]
3739turbo = [
3840 " PyTurboJPEG" , # Requires libjpeg-turbo to be available on the system
3941]
Original file line number Diff line number Diff line change 1- from numpy . typing import NDArray
1+ from contextlib import suppress
22from io import BytesIO
3- import pillow_avif # noqa
3+
4+ from numpy .typing import NDArray
45from PIL import Image
5- from trame_rca .encoders .img import TO_IMAGE_TYPE , TO_IMAGE_FORMAT
6+
7+ from trame_rca .encoders .img import TO_IMAGE_FORMAT , TO_IMAGE_TYPE
8+
9+ # Not supported on all platform so make it optional
10+ with suppress (ImportError ):
11+ import pillow_avif # noqa
612
713
814def encode (
You can’t perform that action at this time.
0 commit comments