mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 01:34:24 +03:00
Use quantization method attributes
This commit is contained in:
parent
aa35f6b572
commit
4e0bc3bab6
|
@ -1074,11 +1074,11 @@ class Image:
|
||||||
|
|
||||||
if method is None:
|
if method is None:
|
||||||
# defaults:
|
# defaults:
|
||||||
method = 0
|
method = MEDIANCUT
|
||||||
if self.mode == "RGBA":
|
if self.mode == "RGBA":
|
||||||
method = 2
|
method = FASTOCTREE
|
||||||
|
|
||||||
if self.mode == "RGBA" and method not in (2, 3):
|
if self.mode == "RGBA" and method not in (FASTOCTREE, LIBIMAGEQUANT):
|
||||||
# Caller specified an invalid mode.
|
# Caller specified an invalid mode.
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"Fast Octree (method == 2) and libimagequant (method == 3) "
|
"Fast Octree (method == 2) and libimagequant (method == 3) "
|
||||||
|
|
Loading…
Reference in New Issue
Block a user