diff --git a/docs/reference/Image.rst b/docs/reference/Image.rst index f0a3684794f..92481f59a1b 100644 --- a/docs/reference/Image.rst +++ b/docs/reference/Image.rst @@ -479,6 +479,8 @@ Used to specify the pallete to use for the :meth:`~Image.convert` method. .. data:: WEB .. data:: ADAPTIVE +.. _quantization-methods: + Quantization methods ^^^^^^^^^^^^^^^^^^^^ @@ -486,11 +488,11 @@ Used to specify the quantization method to use for the :meth:`~Image.quantize` m .. data:: MEDIANCUT - Median cut + Median cut. RGBA not supported. .. data:: MAXCOVERAGE - Maximum coverage + Maximum coverage. RGBA not supported. .. data:: FASTOCTREE diff --git a/src/PIL/Image.py b/src/PIL/Image.py index e6d3adcf748..b9150308e35 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -1053,12 +1053,9 @@ def quantize(self, colors=256, method=None, kmeans=0, palette=None, dither=1): of colors. :param colors: The desired number of colors, <= 256 - :param method: :data:`MEDIANCUT` (median cut), - :data:`MAXCOVERAGE` (maximum coverage), - :data:`FASTOCTREE` (fast octree), - :data:`LIBIMAGEQUANT` (libimagequant; check support using - :py:func:`PIL.features.check_feature` - with ``feature="libimagequant"``). + :param method: :data:`MEDIANCUT` (default), + :data:`FASTOCTREE` (default for "RGBA" mode). + See :ref:`quantization-methods` for all available methods. :param kmeans: Integer :param palette: Quantize to the palette of given :py:class:`PIL.Image.Image`.