hmm well Im guessing your server would most likely have the ImageMagick binary installed so you could use exec() in php to excucute it from command line to create an animated picture...
http://software.newsforge.com/article.pl?sid=05/07/01/1959251&from=rss
http://www.imagemagick.org/script/command-line-options.php