--- 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):
