ImagePalette: Add param documentation

This commit is contained in:
Sandy 2015-08-20 15:25:08 -04:00
parent e4f68d0658
commit 93a8e43ddf

View File

@ -22,7 +22,19 @@ from PIL import ImageColor
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):
self.mode = mode