Skip to content

Commit

Permalink
Merge pull request #5638 from radarhere/palette_size
Browse files Browse the repository at this point in the history
Corrected ImagePalette size parameter documentation
  • Loading branch information
hugovk committed Jul 28, 2021
2 parents 55cec2a + a43d46e commit f0679af
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/PIL/ImagePalette.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ class ImagePalette:
: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
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.
:param size: An optional palette size. If given, it cannot be equal to
or greater than 256. Defaults to 0.
:param size: An optional palette size. If given, an error is raised
if ``palette`` is not of equal length.
"""

def __init__(self, mode="RGB", palette=None, size=0):
Expand Down

0 comments on commit f0679af

Please sign in to comment.