mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +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:
|
||||
# defaults:
|
||||
method = 0
|
||||
method = MEDIANCUT
|
||||
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.
|
||||
raise ValueError(
|
||||
"Fast Octree (method == 2) and libimagequant (method == 3) "
|
||||
|
|
Loading…
Reference in New Issue
Block a user