mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-26 07:04:45 +03:00
Typing: quantize
This commit is contained in:
parent
4aaa3cb171
commit
6e79536e09
|
@ -31,7 +31,6 @@ if False:
|
||||||
|
|
||||||
# Just required for typing, or gradual module inclusion while adding annotation?
|
# Just required for typing, or gradual module inclusion while adding annotation?
|
||||||
import pathlib
|
import pathlib
|
||||||
# from . import ImagingPalette ## FIXME TYPING This will need a stub?
|
|
||||||
from . import ImagePalette
|
from . import ImagePalette
|
||||||
from .ImageFilter import Filter
|
from .ImageFilter import Filter
|
||||||
from .ImageFile import PyDecoder
|
from .ImageFile import PyDecoder
|
||||||
|
@ -1046,7 +1045,7 @@ class Image(object):
|
||||||
return new_im
|
return new_im
|
||||||
|
|
||||||
def quantize(self, colors=256, method=None, kmeans=0, palette=None):
|
def quantize(self, colors=256, method=None, kmeans=0, palette=None):
|
||||||
# type: (int, Optional[int], int, Optional[ImagingPalette]) -> Image
|
# type: (int, Optional[int], int, Optional[Image]) -> Image
|
||||||
"""
|
"""
|
||||||
Convert the image to 'P' mode with the specified number
|
Convert the image to 'P' mode with the specified number
|
||||||
of colors.
|
of colors.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user