mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-20 21:41:02 +03:00
Updated documentation
This commit is contained in:
parent
bac474402c
commit
8f1524edd8
|
@ -9,10 +9,6 @@ represent the color palette of palette mapped images.
|
||||||
|
|
||||||
.. note::
|
.. 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,
|
The :py:class:`~PIL.ImagePalette.ImagePalette` class has several methods,
|
||||||
but they are all marked as "experimental." Read that as you will. The
|
but they are all marked as "experimental." Read that as you will. The
|
||||||
``[source]`` link is there for a reason.
|
``[source]`` link is there for a reason.
|
||||||
|
|
|
@ -25,15 +25,14 @@ class ImagePalette:
|
||||||
"""
|
"""
|
||||||
Color palette for palette mapped images
|
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"
|
:ref:`concept-modes`. Defaults to "RGB"
|
||||||
:param palette: An optional palette. If given, it must be a bytearray,
|
:param palette: An optional palette. If given, it must be a bytearray,
|
||||||
an array or a list of ints between 0-255 and of length ``size``
|
an array or a list of ints between 0-255. The list must consist of
|
||||||
times the number of colors in ``mode``. The list must be aligned
|
all channels for one color followed by the next color (e.g. RGBRGBRGB).
|
||||||
by channel (All R values must be contiguous in the list before G
|
Defaults to an empty palette.
|
||||||
and B values.) Defaults to 0 through 255 per channel.
|
:param size: An optional palette size. If given, an error is raised
|
||||||
:param size: An optional palette size. If given, it cannot be equal to
|
if ``palette`` is not of equal length.
|
||||||
or greater than 256. Defaults to 0.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, mode="RGB", palette=None, size=0):
|
def __init__(self, mode="RGB", palette=None, size=0):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user