I've opened an issue already here (https://github.com/python-imaging/Pillow/issues/646) but I'm not having much luck with any responses from anyone. Using Pillow, I am taking a large white .gif file and drawing lots of lines and text onto it. It works perfectly fine until I do one too many draw calls. It seems to be dependent on how much is being drawn onto the image. For example, I can do more small line draws than large line draws. One too many draws and I get this error:
File "draw/card.py", line 13, in save
self.image.save(os.path.join(os.path.dirname(os.path.abspath(__file__)), '%s.gif' % file_name), 'gif')
File ".../local/lib/python2.7/site-packages/PIL/Image.py", line 1564, in save
save_handler(self, fp, filename)
File ".../local/lib/python2.7/site-packages/PIL/GifImagePlugin.py", line 317, in _save
ImageFile._save(imOut, fp, [("gif", (0,0)+im.size, 0, rawmode)])
File ".../local/lib/python2.7/site-packages/PIL/ImageFile.py", line 473, in _save
e = Image._getencoder(im.mode, e, a, im.encoderconfig)
File ".../local/lib/python2.7/site-packages/PIL/Image.py", line 413, in _getencoder
return encoder(mode, *args + extra)
SystemError: unknown raw mode
I have removed the full file paths but the .../local/lib are in my virtualenv
Is this a known bug or am I doing something wrong or have I found something wrong with PIL?