Accept 0 as transparency value.
This commit is contained in:
David Schmidt 2014-02-25 09:50:42 +01:00
parent f826114ce9
commit f848993c89

View File

@ -561,7 +561,7 @@ def _save(im, fp, filename, chunk=putchunk, check=0):
transparency = im.encoderinfo.get('transparency',im.info.get('transparency', None))
if transparency:
if transparency or transparency == 0:
if im.mode == "P":
# limit to actual palette size
alpha_bytes = 2**bits