Graphics files & Python

2005-07-28 Thread Pekka Karjalainen
  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
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Graphics files & Python

2005-07-28 Thread Thomas Guettler
Am Thu, 28 Jul 2005 10:40:05 + schrieb Pekka Karjalainen:

>   How can I create image files and animations with Python?

You can create image files with PIL:
http://www.pythonware.com/products/pil/

I don't know if you can make animated gifs.

You can use ImageMagick, too: http://www.imagemagick.org/script/index.php

You can create animated gifs with imagemagick. I use with os.system("...")
(Not the python bindings)

 HTH,
   Thomas

-- 
Thomas Güttler, http://www.thomas-guettler.de/


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Graphics files & Python

2005-07-28 Thread Terry Reedy

"Pekka Karjalainen" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>  How can I create image files and animations with Python?

Besides the other responses, you might also check out the pygame site where 
there once were some tutorial examples of manipulating bitmaps with 
Numerical Python to get various effects.

Terry J. Reedy



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Graphics files & Python

2005-07-30 Thread Pekka Karjalainen
In article <[EMAIL PROTECTED]>, Terry Reedy wrote:
>Besides the other responses, you might also check out the pygame site where 
>there once were some tutorial examples of manipulating bitmaps with 
>Numerical Python to get various effects.
>
  I'll keep this in mind too. Thanks to both for helpful replies.

-- 
Pekka Karjalainen - Oulu, Finland

-- 
http://mail.python.org/mailman/listinfo/python-list