mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-24 17:06:16 +03:00
ImagePalette: Add param documentation
This commit is contained in:
parent
e4f68d0658
commit
93a8e43ddf
|
@ -22,7 +22,19 @@ from PIL import ImageColor
|
||||||
|
|
||||||
|
|
||||||
class ImagePalette(object):
|
class ImagePalette(object):
|
||||||
"Color palette for palette mapped images"
|
"""
|
||||||
|
Color palette for palette mapped images
|
||||||
|
|
||||||
|
: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 and of length ``size``
|
||||||
|
times the number of colors in ``mode``. 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.
|
||||||
|
:param size: An optional palette size. If given, it cannot be equal to
|
||||||
|
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):
|
||||||
self.mode = mode
|
self.mode = mode
|
||||||
|
|
Loading…
Reference in New Issue
Block a user