mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
fixes #513
This commit is contained in:
parent
93a8bc9bd3
commit
232c175bd9
|
@ -505,7 +505,7 @@ def _save(im, fp, filename, chunk=putchunk, check=0):
|
|||
else:
|
||||
# check palette contents
|
||||
if im.palette:
|
||||
colors = len(im.palette.getdata()[1])//3
|
||||
colors = max(len(im.im.getpalette("RGB"))//3, 256)
|
||||
else:
|
||||
colors = 256
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user