Dynamically creating animated GIFs

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hukkas
Forum Newbie
Posts: 2
Joined: Wed Jun 15, 2005 9:47 am

Dynamically creating animated GIFs

Post by hukkas »

Hi all

Is it possible to write a PHP script to create an animated GIF, from a series of JPEG / GIF images? I want to have a small animation display a sequence of product images, but build the animation on an ad-hoc / daily basis.

Thanks in advance
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Animated gifs are SOOO 1998 :) I don't think GD can make animated GIF's, but ImageMagick might be able to.

You might want to consider alternate methods. An animated gif is basically a series of different gif files, so the filesizes can get quite large. If the size of the image is big enough for a person to get a good look at the product, then the image is probably to large a file to be practical on the web (depending of course on the number of products). Have you thought about using Javascript to change the image every 1,2,5,X seconds?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

flash may be a better option.

The flash on this page was generated entirely with PHP

http://jerryscript.hostrocket.com/php/ming/lessons/
Post Reply