Problem creating animated gif

A

abcd

I am using gifmaker.py from PIL v1.1.5 on python 2.4.1.

CODE
----------------------------------------------------------------
import ImageGrab, gifmaker

seq = []

while keepOnGoing:
im = ImageGrab.grab()
seq.append(im)

fp = open("out.gif", "wb")
gifmaker.makedelta(fp, seq)
fp.close()

---------------------------------------------------------------

however I am getting this error:

Exception in thread Thread-3:
Traceback (most recent call last):
File "c:\Python24\lib\threading.py", line 442, in __bootstrap
self.run()
File "c:\foo.py", line 10, in run
gifmaker.makedelta(fp, seq)
File "c:\gifmaker.py", line 79, in makedelta
for s in getheader(im) + getdata(im):
File "c:\Python24\Lib\site-packages\PIL\GifImagePlugin.py", line 383,
in getdata
ImageFile._save(im, fp, [("gif", (0,0)+im.size, 0,
RAWMODE[im.mode])])
KeyError: 'RGB'


Any ideas? Basically I want to make an animated GIF out of a bunch of
images taken using the ImageGrab module.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top