pillow-avif-plugin 1.3.1__cp37-cp37m-win_amd64.whl → 1.4.0__cp37-cp37m-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.

@@ -51,7 +51,6 @@ def _accept(prefix):
51
51
 
52
52
 
53
53
  class AvifImageFile(ImageFile.ImageFile):
54
-
55
54
  format = "AVIF"
56
55
  format_description = "AVIF image"
57
56
  __loaded = -1
@@ -67,7 +66,10 @@ class AvifImageFile(ImageFile.ImageFile):
67
66
  self._size = width, height
68
67
  self.n_frames = n_frames
69
68
  self.is_animated = self.n_frames > 1
70
- self.mode = self.rawmode = mode
69
+ try:
70
+ self.mode = self.rawmode = mode
71
+ except AttributeError:
72
+ self._mode = self.rawmode = mode
71
73
  self.tile = []
72
74
 
73
75
  if icc:
@@ -137,7 +139,7 @@ def _save(im, fp, filename, save_all=False):
137
139
  # - qmax is 0 for quality=100, then qmax increases linearly relative to
138
140
  # quality decreasing, until it flattens out at quality=37.
139
141
  quality = info.get("quality", 75)
140
- if not isinstance(quality, int):
142
+ if not isinstance(quality, int) or quality < 0 or quality > 100:
141
143
  raise ValueError("Invalid quality setting")
142
144
  qmin = max(0, min(64 - quality, 63))
143
145
  qmax = max(0, min(100 - quality, 63))
@@ -187,6 +189,7 @@ def _save(im, fp, filename, save_all=False):
187
189
  subsampling,
188
190
  qmin,
189
191
  qmax,
192
+ quality,
190
193
  speed,
191
194
  codec,
192
195
  range_,
pillow_avif/__init__.py CHANGED
@@ -2,4 +2,4 @@ from . import AvifImagePlugin
2
2
 
3
3
 
4
4
  __all__ = ["AvifImagePlugin"]
5
- __version__ = "1.3.1"
5
+ __version__ = "1.4.0"
Binary file
@@ -1,37 +1,36 @@
1
- Metadata-Version: 2.1
2
- Name: pillow-avif-plugin
3
- Version: 1.3.1
4
- Summary: A pillow plugin that adds avif support via libavif
5
- Home-page: https://github.com/fdintino/pillow-avif-plugin/
6
- Author: Frankie Dintino
7
- Author-email: fdintino@theatlantic.com
8
- License: MIT License
9
- Download-URL: https://github.com/fdintino/pillow-avif-plugin/releases
10
- Platform: UNKNOWN
11
- Classifier: Development Status :: 5 - Production/Stable
12
- Classifier: Environment :: Web Environment
13
- Classifier: Intended Audience :: Developers
14
- Classifier: License :: OSI Approved :: MIT License
15
- Classifier: Operating System :: OS Independent
16
- Classifier: Programming Language :: C
17
- Classifier: Programming Language :: C++
18
- Classifier: Programming Language :: Python :: 2.7
19
- Classifier: Programming Language :: Python :: 3
20
- Classifier: Programming Language :: Python :: 3.7
21
- Classifier: Programming Language :: Python :: 3.8
22
- Classifier: Programming Language :: Python :: 3.9
23
- Classifier: Programming Language :: Python :: 3.10
24
- Classifier: Programming Language :: Python :: 3.11
25
- Classifier: Programming Language :: Python :: Implementation :: CPython
26
- Classifier: Programming Language :: Python :: Implementation :: PyPy
27
- Classifier: Topic :: Multimedia :: Graphics
28
- Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
29
- Description-Content-Type: text/markdown
30
-
31
- # pillow-avif-plugin
32
-
33
- This is a plugin that adds support for AVIF files until official support has been added (see [this pull request](https://github.com/python-pillow/Pillow/pull/5201)).
34
-
35
- To register this plugin with pillow you will need to add `import pillow_avif` somewhere in your application.
36
-
37
-
1
+ Metadata-Version: 2.1
2
+ Name: pillow-avif-plugin
3
+ Version: 1.4.0
4
+ Summary: A pillow plugin that adds avif support via libavif
5
+ Home-page: https://github.com/fdintino/pillow-avif-plugin/
6
+ Download-URL: https://github.com/fdintino/pillow-avif-plugin/releases
7
+ Author: Frankie Dintino
8
+ Author-email: fdintino@theatlantic.com
9
+ License: MIT License
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Environment :: Web Environment
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: C
16
+ Classifier: Programming Language :: C++
17
+ Classifier: Programming Language :: Python :: 2.7
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.7
20
+ Classifier: Programming Language :: Python :: 3.8
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: Implementation :: CPython
26
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
27
+ Classifier: Topic :: Multimedia :: Graphics
28
+ Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
29
+ Description-Content-Type: text/markdown
30
+ License-File: LICENSE
31
+
32
+ # pillow-avif-plugin
33
+
34
+ This is a plugin that adds support for AVIF files until official support has been added (see [this pull request](https://github.com/python-pillow/Pillow/pull/5201)).
35
+
36
+ To register this plugin with pillow you will need to add `import pillow_avif` somewhere in your application.
@@ -0,0 +1,9 @@
1
+ pillow_avif/AvifImagePlugin.py,sha256=BYBYS9qD5JUoRQPA7Nrr4asqeyRq_BXKqj1_Sy3O0gk,8703
2
+ pillow_avif/__init__.py,sha256=_ASToIhzqkCoKaYCNv1DUdt_zrIO-tcI1ubuxMaDos4,89
3
+ pillow_avif/_avif.cp37-win_amd64.pyd,sha256=y_8D6zMakWHahAGca1uiyg2dumD-u-y_lUjzlCYtEMU,26011648
4
+ pillow_avif_plugin-1.4.0.dist-info/LICENSE,sha256=tubzK3TFrT8GFgUPEKC-WmCziD1dGOFLCjDky3t9Lnc,1321
5
+ pillow_avif_plugin-1.4.0.dist-info/METADATA,sha256=TATphSXrFm1CtSybbOYQ90GxvAtZNBxd7rmgzJfGuvA,1704
6
+ pillow_avif_plugin-1.4.0.dist-info/WHEEL,sha256=P6MkoxfArCDjH_Cd27qF5eFfOSJbz6XgNmPOs7M04KU,101
7
+ pillow_avif_plugin-1.4.0.dist-info/top_level.txt,sha256=xrg4zRnqDyl_JEyEQh3oCcAU4BHneocD-DCFDzf4g9E,12
8
+ pillow_avif_plugin-1.4.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
9
+ pillow_avif_plugin-1.4.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.37.1)
2
+ Generator: bdist_wheel (0.41.2)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp37-cp37m-win_amd64
5
5
 
@@ -1,9 +0,0 @@
1
- pillow_avif/AvifImagePlugin.py,sha256=yGgV3WWSKQb5XoPTuAkPGfRK8bIum2lHRksEmaZeuZs,8559
2
- pillow_avif/__init__.py,sha256=2vOjmsU7AzmOPnimS7tfdkA62XwYC6_ZwqGDS5JOZTI,89
3
- pillow_avif/_avif.cp37-win_amd64.pyd,sha256=udbodOu44-4O8aV4KIoTdwYYulbsRMuSqobLYc7ykJQ,22972416
4
- pillow_avif_plugin-1.3.1.dist-info/LICENSE,sha256=tubzK3TFrT8GFgUPEKC-WmCziD1dGOFLCjDky3t9Lnc,1321
5
- pillow_avif_plugin-1.3.1.dist-info/METADATA,sha256=O6pMirFP9mSu0b3vC8Rf8n_49GSr7DBiD2JTAItJrM0,1615
6
- pillow_avif_plugin-1.3.1.dist-info/WHEEL,sha256=-FqDJjo4HrkrIaThvtAYef2eEAn1_QvVe5nINCnUEbQ,101
7
- pillow_avif_plugin-1.3.1.dist-info/top_level.txt,sha256=xrg4zRnqDyl_JEyEQh3oCcAU4BHneocD-DCFDzf4g9E,12
8
- pillow_avif_plugin-1.3.1.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
9
- pillow_avif_plugin-1.3.1.dist-info/RECORD,,