This commit is contained in:
David Schmidt 2014-02-05 12:49:06 +01:00 committed by wiredfool
parent 93a8bc9bd3
commit 232c175bd9

View File

@ -505,7 +505,7 @@ def _save(im, fp, filename, chunk=putchunk, check=0):
else: else:
# check palette contents # check palette contents
if im.palette: if im.palette:
colors = len(im.palette.getdata()[1])//3 colors = max(len(im.im.getpalette("RGB"))//3, 256)
else: else:
colors = 256 colors = 256