GifCreator 是一个 PHP 类,可从多个图像创建动画 GIF。
GifCreator is a PHP class to create animated GIF from multiple images
This class helps you to create an animated GIF image: give multiple images and their duration and that's it !
1 - Creation:
…The 3rd parameter of create() method allows you to choose the number of loop of your animated gif before it stops. In the previous example, I chose 5 loops. Set 0 (zero) to get an infinite loop.
2 - Get the result:
You can now get the animated GIF binary:
$gifBinary = $gc->getGif();Then you can show it in the navigator:
header('Content-type: image/gif');
header('Content-Disposition: filename="butterfly.gif"');
echo $gifBinary;
exit;Or save it in a folder as a GIF:
file_put_contents('/myfolder/animated_picture.gif', $gifBinary);The class reuses some part of code of "GIFEncoder.class.php" by László Zsidi (thanks to him).
暂无开放 Issues,或尚未同步最近议题。