pillow-avif-plugin 1.4.3__cp311-cp311-win_amd64.whl → 1.4.5__cp311-cp311-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pillow-avif-plugin might be problematic. Click here for more details.
- pillow_avif/AvifImagePlugin.py +8 -1
- pillow_avif/__init__.py +1 -1
- pillow_avif/_avif.cp311-win_amd64.pyd +0 -0
- {pillow_avif_plugin-1.4.3.dist-info → pillow_avif_plugin-1.4.5.dist-info}/METADATA +1 -1
- pillow_avif_plugin-1.4.5.dist-info/RECORD +9 -0
- {pillow_avif_plugin-1.4.3.dist-info → pillow_avif_plugin-1.4.5.dist-info}/WHEEL +1 -1
- pillow_avif_plugin-1.4.3.dist-info/RECORD +0 -9
- {pillow_avif_plugin-1.4.3.dist-info → pillow_avif_plugin-1.4.5.dist-info}/LICENSE +0 -0
- {pillow_avif_plugin-1.4.3.dist-info → pillow_avif_plugin-1.4.5.dist-info}/top_level.txt +0 -0
- {pillow_avif_plugin-1.4.3.dist-info → pillow_avif_plugin-1.4.5.dist-info}/zip-safe +0 -0
pillow_avif/AvifImagePlugin.py
CHANGED
|
@@ -16,6 +16,7 @@ except ImportError:
|
|
|
16
16
|
# to Image.open (see https://github.com/python-pillow/Pillow/issues/569)
|
|
17
17
|
DECODE_CODEC_CHOICE = "auto"
|
|
18
18
|
CHROMA_UPSAMPLING = "auto"
|
|
19
|
+
DEFAULT_MAX_THREADS = 0
|
|
19
20
|
|
|
20
21
|
_VALID_AVIF_MODES = {"RGB", "RGBA"}
|
|
21
22
|
|
|
@@ -61,7 +62,7 @@ class AvifImageFile(ImageFile.ImageFile):
|
|
|
61
62
|
|
|
62
63
|
def _open(self):
|
|
63
64
|
self._decoder = _avif.AvifDecoder(
|
|
64
|
-
self.fp.read(), DECODE_CODEC_CHOICE, CHROMA_UPSAMPLING
|
|
65
|
+
self.fp.read(), DECODE_CODEC_CHOICE, CHROMA_UPSAMPLING, DEFAULT_MAX_THREADS
|
|
65
66
|
)
|
|
66
67
|
|
|
67
68
|
# Get info from decoder
|
|
@@ -138,6 +139,7 @@ def _save(im, fp, filename, save_all=False):
|
|
|
138
139
|
duration = info.get("duration", 0)
|
|
139
140
|
subsampling = info.get("subsampling", "4:2:0")
|
|
140
141
|
speed = info.get("speed", 6)
|
|
142
|
+
max_threads = info.get("max_threads", DEFAULT_MAX_THREADS)
|
|
141
143
|
codec = info.get("codec", "auto")
|
|
142
144
|
range_ = info.get("range", "full")
|
|
143
145
|
tile_rows_log2 = info.get("tile_rows", 0)
|
|
@@ -196,6 +198,7 @@ def _save(im, fp, filename, save_all=False):
|
|
|
196
198
|
qmax,
|
|
197
199
|
quality,
|
|
198
200
|
speed,
|
|
201
|
+
max_threads,
|
|
199
202
|
codec,
|
|
200
203
|
range_,
|
|
201
204
|
tile_rows_log2,
|
|
@@ -230,6 +233,10 @@ def _save(im, fp, filename, save_all=False):
|
|
|
230
233
|
"A" in ims.mode
|
|
231
234
|
or "a" in ims.mode
|
|
232
235
|
or (ims.mode == "P" and "A" in ims.im.getpalettemode())
|
|
236
|
+
or (
|
|
237
|
+
ims.mode == "P"
|
|
238
|
+
and ims.info.get("transparency", None) is not None
|
|
239
|
+
)
|
|
233
240
|
)
|
|
234
241
|
rawmode = "RGBA" if alpha else "RGB"
|
|
235
242
|
frame = ims.convert(rawmode)
|
pillow_avif/__init__.py
CHANGED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pillow-avif-plugin
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.5
|
|
4
4
|
Summary: A pillow plugin that adds avif support via libavif
|
|
5
5
|
Home-page: https://github.com/fdintino/pillow-avif-plugin/
|
|
6
6
|
Download-URL: https://github.com/fdintino/pillow-avif-plugin/releases
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
pillow_avif/AvifImagePlugin.py,sha256=frEKrbOSyxbVr4HCqjo0SgJxKLQ6lYvBO_8rg1PLsSo,8768
|
|
2
|
+
pillow_avif/__init__.py,sha256=jR12kFfflv1b-bgxhhMc1DAsuJ-I7I_2oqKGuZo747I,89
|
|
3
|
+
pillow_avif/_avif.cp311-win_amd64.pyd,sha256=DszxGUiaYB_ZQndDCgQnDSIU1QzQmkWtWVXoD1E57MM,27896832
|
|
4
|
+
pillow_avif_plugin-1.4.5.dist-info/LICENSE,sha256=tubzK3TFrT8GFgUPEKC-WmCziD1dGOFLCjDky3t9Lnc,1321
|
|
5
|
+
pillow_avif_plugin-1.4.5.dist-info/METADATA,sha256=csqDvrNNg1qTXtUSNrH15iIZBnka4VI7rLimFQNOU3I,1704
|
|
6
|
+
pillow_avif_plugin-1.4.5.dist-info/WHEEL,sha256=WYSXpZsvXNiAggUvUzBeRCxUY27Bzz6nBjGWxD02TN4,101
|
|
7
|
+
pillow_avif_plugin-1.4.5.dist-info/top_level.txt,sha256=xrg4zRnqDyl_JEyEQh3oCcAU4BHneocD-DCFDzf4g9E,12
|
|
8
|
+
pillow_avif_plugin-1.4.5.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
9
|
+
pillow_avif_plugin-1.4.5.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
pillow_avif/AvifImagePlugin.py,sha256=lAVnA30X0re_zar8Wp0-Z9grIVZMqv60sH0HHbetExg,8454
|
|
2
|
-
pillow_avif/__init__.py,sha256=c68dCdjcj9aZDFR4eX4aVammttGgrX8xhUuNT2qbOCs,89
|
|
3
|
-
pillow_avif/_avif.cp311-win_amd64.pyd,sha256=9YlsSw1cPW34HFTcthPFD2UQ9J0ewJxCwqr28RkH3VU,28395008
|
|
4
|
-
pillow_avif_plugin-1.4.3.dist-info/LICENSE,sha256=tubzK3TFrT8GFgUPEKC-WmCziD1dGOFLCjDky3t9Lnc,1321
|
|
5
|
-
pillow_avif_plugin-1.4.3.dist-info/METADATA,sha256=V8ODP5OEe4i8KFj_ElSlRCfY0uEYCgayihu1vYKr9IQ,1704
|
|
6
|
-
pillow_avif_plugin-1.4.3.dist-info/WHEEL,sha256=ircjsfhzblqgSzO8ow7-0pXK-RVqDqNRGQ8F650AUNM,102
|
|
7
|
-
pillow_avif_plugin-1.4.3.dist-info/top_level.txt,sha256=xrg4zRnqDyl_JEyEQh3oCcAU4BHneocD-DCFDzf4g9E,12
|
|
8
|
-
pillow_avif_plugin-1.4.3.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
9
|
-
pillow_avif_plugin-1.4.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|