Graphics files & Python

Pekka Karjalainen pkarjala at
Thu Jul 28 12:40:05 CEST 2005

  How can I create image files and animations with Python?

  I will clarify a bit. This is a question of recreational programming. I 
have already made some animated gifs from Julia sets using Python and some 
external programs. I hit upon a quick solution of writing ppm image files 
(it's a simple text based format) and using ppmtogif to make gifs out of 
them, then using gifsicle (free program found on the web) to join them 
into animated gif files.

  You can see some of my results in: 


  That's a small file that links to large (0.8 meg or so) files. They are 
a bit bland at the moment, but I might get around to improving the things 
later :-)

  This seems to work well enough for the modest goals that I have -- I 
just want to make a few beautiful fractal images and animations, and learn 
a bit more about Python while tinkering along.

  However, I might as well ask. Are there other good options for creating
images and animations using Python? As it is, I build my data into an
array representing the bitmap and the value of each pixel, and then write
it into a temp file in ppm format. It's a little slow, but it still runs
fast enough for me at the moment. I have no intention of writing a major
new fractal exploring software after all, so I'm not worried about
execution time, I'm worried about my own programmer's time (which I want
to save for other things).

  Any suggestions?

Pekka Karjalainen - Oulu, Finland

More information about the Python-list mailing list