[Image-SIG] PIL 1.0b1 and GifImagePlugin.py

Daniel Walton image_sig@opti.okdirect.com
Sat, 13 Feb 1999 15:48:09 -0600


I'm having a problem with the GifImagePlugin module and figured someone one
this list would be able to patch it easily.  I looked over the source
briefly but don't have the time to go in depth to figure out a patch,
sorry.  Here's the traceback.  Looks like it might have something to do
with Gif global vs. local palettes but I could be wrong. A GIF image is
temporarily available at the following URL that exhibits the problem:

http://members.aol.com/HP2000c/pbe/banner1.gif 


Traceback (innermost last):
  File "/usr/home/cginet/www/services/orbitcycle/index.cgi", line 3, in ?
    import switch
  File "/usr/home/cginet/www/services/orbitcycle/switch.py", line 110, in ?
    func(form)
  File "/usr/home/cginet/www/services/orbitcycle/bannersets.py", line 2254,
in add_random_banner_submit_1
    (res, err) = get_banner_res(account, image_url)
  File "/usr/home/cginet/www/services/orbitcycle/bannersets.py", line 4058,
in get_banner_res
    im = Image.open(image_data)
  File "/usr/local/lib/python1.5/site-packages/PIL/Image.py", line 894, in open
    return factory(fp, filename)
  File "/usr/local/lib/python1.5/site-packages/PIL/ImageFile.py", line 64,
in __init__
    self._open()
  File "/usr/local/lib/python1.5/site-packages/PIL/GifImagePlugin.py", line
86, in _open
    self.seek(0) # get ready to read first frame
  File "/usr/local/lib/python1.5/site-packages/PIL/GifImagePlugin.py", line
109, in seek
    self.palette = self.global_palette
AttributeError: global_palette


If anyone comes up with a patch I would greatly appreciate a copy.

Daniel Walton