Updated documentation

This commit is contained in:
Andrew Murray 2021-07-10 00:36:24 +10:00
parent cf275737ee
commit d0a30ec369
2 changed files with 4 additions and 8 deletions

View File

@ -9,10 +9,6 @@ represent the color palette of palette mapped images.
.. note::
This module was never well-documented. It hasn't changed since 2001,
though, so it's probably safe for you to read the source code and puzzle
out the internals if you need to.
The :py:class:`~PIL.ImagePalette.ImagePalette` class has several methods,
but they are all marked as "experimental." Read that as you will. The
``[source]`` link is there for a reason.

View File

@ -25,12 +25,12 @@ class ImagePalette:
"""
Color palette for palette mapped images
:param mode: The mode to use for the Palette. See:
:param mode: The mode to use for the palette. See:
:ref:`concept-modes`. Defaults to "RGB"
:param palette: An optional palette. If given, it must be a bytearray,
an array or a list of ints between 0-255. The list must be aligned
by channel (All R values must be contiguous in the list before G
and B values.) Defaults to 0 through 255 per channel.
an array or a list of ints between 0-255. The list must consist of
all channels for one color followed by the next color (e.g. RGBRGBRGB).
Defaults to an empty palette.
:param size: An optional palette size. If given, an error is raised
if ``palette`` is not of equal length.
"""