Location: PHPKode > scripts > GIF images into animated GIF with native PHP class > gif-images-into-animated-gif-with-native-php-class/example.php
<?php
header('Content-type: image/gif');
require('GifMerge.class.php');
$i = array("frame01.gif","frame02.gif","frame03.gif","frame04.gif","frame05.gif",
		   "frame06.gif","frame07.gif","frame08.gif","frame09.gif","frame10.gif",
		   "frame11.gif","frame12.gif","frame13.gif","frame14.gif","frame15.gif",
		   "frame16.gif","frame17.gif");
$d = array(10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10);
$x = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
$y = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
$anim = new GifMerge($i, 255, 255, 255, 0, $d, $x, $y, 'C_FILE');
echo $anim->getAnimation();
?>
Return current item: GIF images into animated GIF with native PHP class