mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Fix saving images with added transparency
See http://mail.python.org/pipermail/image-sig/1999-February/000648.html This patch was carried by fedora for python-imaging
This commit is contained in:
parent
8fc5fbc6c1
commit
cc439099c1
|
@ -364,6 +364,11 @@ def getheader(im, palette=None, info=None):
|
||||||
for i in range(maxcolor):
|
for i in range(maxcolor):
|
||||||
s.append(o8(i) * 3)
|
s.append(o8(i) * 3)
|
||||||
|
|
||||||
|
if im.info.has_key('transparency'):
|
||||||
|
transparentIndex = im.info['transparency']
|
||||||
|
s.append('!' + o8(0xf9) + o8(4) + o8(1) + o8(0) + o8(0) +
|
||||||
|
o8(transparentIndex) + o8(0))
|
||||||
|
|
||||||
return s
|
return s
|
||||||
|
|
||||||
def getdata(im, offset = (0, 0), **params):
|
def getdata(im, offset = (0, 0), **params):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user