PDA

Click to See Complete Forum and Search --> : [RESOLVED] Loading GIFs with GD?


DarkDemon
Jun 19th, 2007, 10:05 AM
Is it possible to load an entire gif with PHP?

header("Content-type: image/gif");
$im = imagecreatefromgif("ani.gif");
header("Content-Type: image/gif");
imagegif($im);
imagedestroy($im);

^ I've tried the following but it only loads the first frame.

visualAd
Jun 19th, 2007, 10:34 AM
What happens the second time?

You don't need to load the image with GD if you do not intend resizing / sampling it.

header("Content-type: image/gif");
echo(file_get_contents("ani.gif"));

DarkDemon
Jun 19th, 2007, 10:47 AM
That works perfect thanks alot.