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

@@ -126,23 +126,11 @@ def _save(im, fp, filename, save_all=False):
126
126
 
127
127
  is_single_frame = total == 1
128
128
 
129
- qmin = info.get("qmin")
130
- qmax = info.get("qmax")
131
-
132
- if qmin is None and qmax is None:
133
- # The min and max quantizer settings in libavif range from 0 (best quality)
134
- # to 63 (worst quality). If neither are explicitly specified, we use a 0-100
135
- # quality scale (default 75) and calculate the qmin and qmax from that.
136
- #
137
- # - qmin is 0 for quality >= 64. Below that, qmin has an inverse linear
138
- # relation to quality (i.e., quality 63 = qmin 1, quality 0 => qmin 63)
139
- # - qmax is 0 for quality=100, then qmax increases linearly relative to
140
- # quality decreasing, until it flattens out at quality=37.
141
- quality = info.get("quality", 75)
142
- if not isinstance(quality, int) or quality < 0 or quality > 100:
143
- raise ValueError("Invalid quality setting")
144
- qmin = max(0, min(64 - quality, 63))
145
- qmax = max(0, min(100 - quality, 63))
129
+ qmin = info.get("qmin", -1)
130
+ qmax = info.get("qmax", -1)
131
+ quality = info.get("quality", 75)
132
+ if not isinstance(quality, int) or quality < 0 or quality > 100:
133
+ raise ValueError("Invalid quality setting")
146
134
 
147
135
  duration = info.get("duration", 0)
148
136
  subsampling = info.get("subsampling", "4:2:0")
pillow_avif/__init__.py CHANGED
@@ -2,4 +2,4 @@ from . import AvifImagePlugin
2
2
 
3
3
 
4
4
  __all__ = ["AvifImagePlugin"]
5
- __version__ = "1.4.0"
5
+ __version__ = "1.4.1"
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pillow-avif-plugin
3
- Version: 1.4.0
3
+ Version: 1.4.1
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=-tzGuNK05MzVqJeqJ9sglLXp4Btg6AwX396luIAhUzs,7730
2
+ pillow_avif/__init__.py,sha256=TMNAyGWthW-dGYbEluqxCn3tNMeJF3q7-nkIZXpYoEw,84
3
+ pillow_avif/_avif.cpython-37m-darwin.so,sha256=86kbArp5JQ3RWpfLk7Lk8V2Z_QF0qxWDNAnHNgf9kuc,11831656
4
+ pillow_avif_plugin-1.4.1.dist-info/LICENSE,sha256=2l49eVdgaNy9JTEPbstz1GaaPKw02gFdtuThTNUi730,25213
5
+ pillow_avif_plugin-1.4.1.dist-info/METADATA,sha256=riGgqc74ZQc3YPuOgqFiNQ_O3wDFhBRjnPq4reKLxa0,1668
6
+ pillow_avif_plugin-1.4.1.dist-info/WHEEL,sha256=OpgwcRZuIq86N8PNaymr9AxpuMy4EBT105MNpTrXC_U,109
7
+ pillow_avif_plugin-1.4.1.dist-info/top_level.txt,sha256=xrg4zRnqDyl_JEyEQh3oCcAU4BHneocD-DCFDzf4g9E,12
8
+ pillow_avif_plugin-1.4.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
9
+ pillow_avif_plugin-1.4.1.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- pillow_avif/AvifImagePlugin.py,sha256=GeBGlSqlc7BxefTzMKK-YRTJcvo7GeE68jqDdraUnkA,8434
2
- pillow_avif/__init__.py,sha256=KOvHpXQefN5SKRheYSTMIbRHWVvp6ClvnfT0cjDmL5M,84
3
- pillow_avif/_avif.cpython-37m-darwin.so,sha256=kiJZntLJjV983txHKfpoP5YbAOJz0CsSgJMvs1VoDVo,11831656
4
- pillow_avif_plugin-1.4.0.dist-info/LICENSE,sha256=2l49eVdgaNy9JTEPbstz1GaaPKw02gFdtuThTNUi730,25213
5
- pillow_avif_plugin-1.4.0.dist-info/METADATA,sha256=-t1rfG3DAYJqocic2KMehZij-n-6_S1PUozPJvLJ6t4,1668
6
- pillow_avif_plugin-1.4.0.dist-info/WHEEL,sha256=OpgwcRZuIq86N8PNaymr9AxpuMy4EBT105MNpTrXC_U,109
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=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
9
- pillow_avif_plugin-1.4.0.dist-info/RECORD,,