mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-27 23:54:46 +03:00
Type annotations: Allow Image.putpalette to accept ImagePalette.
This commit is contained in:
parent
9112e3f4b1
commit
0ac87cc06b
|
@ -1626,7 +1626,7 @@ class Image(object):
|
||||||
self.im.putdata(data, scale, offset)
|
self.im.putdata(data, scale, offset)
|
||||||
|
|
||||||
def putpalette(self, data, rawmode="RGB"):
|
def putpalette(self, data, rawmode="RGB"):
|
||||||
# type: (Sequence[Union[int, bytes]], Mode) -> None
|
# type: (Union[ImagePalette.ImagePalette, Sequence[Union[int, bytes]]], Mode) -> None
|
||||||
"""
|
"""
|
||||||
Attaches a palette to this image. The image must be a "P" or
|
Attaches a palette to this image. The image must be a "P" or
|
||||||
"L" image, and the palette sequence must contain 768 integer
|
"L" image, and the palette sequence must contain 768 integer
|
||||||
|
|
Loading…
Reference in New Issue
Block a user