summaryrefslogtreecommitdiff
path: root/dev-python/imaging/files/imaging-1.1.7-giftrans.patch
blob: 1a109d28eee0599835007f102058908b4805ce52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- Imaging-1.1.6.orig/PIL/GifImagePlugin.py    2006-12-03 11:37:15.000000000 +0000
+++ Imaging-1.1.6/PIL/GifImagePlugin.py 2008-10-02 14:51:43.000000000 +0100
@@ -352,6 +352,11 @@
         for i in range(maxcolor):
             s.append(chr(i) * 3)
 
+    if im.info.has_key('transparency'):
+        transparentIndex = im.info['transparency']
+        s.append('!' + chr(0xf9) + chr(4) + chr(1) + chr(0) + chr(0) +
+                 chr(transparentIndex) + chr(0))
+
     return s
 
 def getdata(im, offset = (0, 0), **params):