2006-09-14
■[PHP]PHPでアニメーションGIF
This class can be used to generate a GIF animation from a set of individual frames in GIF image format.
The class takes as input parameters the list of GIF frame image files, the animation delay between each frame, the horizontal and vertical offset of each frame image.
PHP Classes - Class: GIF images into animated GIF with native PHP class
2006年6月のInnovation Award第5位に選ばれたパッケージで、コードの改変をしなければ商用利用も可能だそうです。
ダウンロードしたアーカイブに含まれるサンプルコードを見てみましたが、非常に簡単です。
<?php
header('Content-type: image/gif');
require('GifMerge.class.php');
$i = array("frame01.gif","frame02.gif","frame03.gif", ...);
$d = array(10, 10, 10, ...);
$x = array(0, 0, 0, ...);
$y = array(0, 0, 0, ...);
$anim = new GifMerge($i, 255, 255, 255, 0, $d, $x, $y, 'C_FILE');
echo $anim->getAnimation();
?>
GD拡張モジュールにない機能なので、何かと重宝しそうです。
ミヨシ石鹸
購入: 14人 クリック: 26回
購入: 14人 クリック: 26回
トラックバック - http://d.hatena.ne.jp/shimooka/20060914/1158209427
リンク元
- 652 http://www.phpclasses.org/browse/package/3163.html
- 212 http://www.phpclasses.org/package/3163-PHP-Generate-GIF-animations-from-a-set-of-GIF-images.html
- 40 http://creazy.net/2008/06/twitgif.html
- 38 http://www.google.co.jp/search?q=PHP+アニメーションGIF&hl=ja&lr=lang_ja&ie=UTF-8&oe=UTF-8
- 29 http://www.google.com/search?hl=ja&lr=lang_ja&ie=UTF-8&oe=UTF-8&q=php+アニメーションGIF&num=50
- 26 http://www.google.co.jp/search?sourceid=navclient&hl=ja&ie=UTF-8&rlz=1T4ADBR_jaJP234JP235&q=GD アニメーションgif
- 22 http://phpclasses.sgboards.com/browse/package/3163.html
- 21 http://search.yahoo.co.jp/search?p=php+アニメgif&ei=UTF-8&fr=oprsd&x=wrt
- 20 http://www.google.co.jp/search?hl=ja&q=php+アニメーションGIF&lr=lang_ja
- 16 http://www.google.co.jp/search?hl=ja&client=firefox-a&rls=org.mozilla:ja:official&hs=7kK&q=PHP GD アニメーションGIF&btnG=検索&lr=lang_ja







