mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
limit custom palette size
This commit is contained in:
parent
4107ca3de0
commit
71b30352d9
|
@ -338,7 +338,7 @@ def getheader(im, palette=None, info=None):
|
||||||
|
|
||||||
# if the user adds a palette, use it
|
# if the user adds a palette, use it
|
||||||
if palette is not None and isinstance(palette, bytes):
|
if palette is not None and isinstance(palette, bytes):
|
||||||
paletteBytes = palette
|
paletteBytes = palette[:768]
|
||||||
else:
|
else:
|
||||||
usedPaletteColors = []
|
usedPaletteColors = []
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user