[Image-SIG] GIF problems

David Ascher da@skivs.ski.org
Thu, 10 Dec 1998 10:01:05 -0800 (Pacific Standard Time)

What's the way to save a P mode image in a GIF-encoded string.  If I try:


I get:

  File "c:\Extras\PIL\Image.py", line 551, in save
    SAVE[string.upper(format)](self, fp, filename)
  File "c:\Extras\PIL\GifImagePlugin.py", line 229, in _save
    ImageFile._save(im, fp, [("gif", (0,0)+im.size, 0, RAWMODE[im.mode])])
  File "c:\Extras\PIL\ImageFile.py", line 223, in _save
    e = Image._getencoder(im.mode, e, a, im.encoderconfig)
  File "c:\Extras\PIL\Image.py", line 174, in _getencoder
    return apply(encoder, args + extra)
TypeError: illegal argument type for built-in operation