如何添加一个或多个gif动画。
// Create image instances
$dest = imagecreatefromgif('php.gif');
$src = imagecreatefromgif('php.gif');
// Copy and merge
imagecopymerge($dest, $src, 10, 10, 0, 0, 100, 47, 75);
// Output and free from memory
header('Content-Type: image/gif');
imagegif($dest);
imagedestroy($dest);
imagedestroy($src);
上面的代码无效。
答案 0 :(得分:0)
http://www.imagemagick.org/Usage/anim_mods/
$ str =“玛丽有一只小羊羔,她喜欢这样”;
echo $ str = str_replace('','',(strtolower($ str)));
exec('convert alphabets / 1 / a.gif -repage 92x62 -coalesce null:(alphabets / 1 / b.gif -coalesce)-geometry + 46 + 0 -layers Composite out.gif');
list($ width,$ height)= getimagesize('alphabets / 1 / egif');
list($ out_width,$ out_height)= getimagesize('out.gif');
$ width1 = $ out_width + $ width;
exec('convert out.gif -repage'。$ width1.'x'。$ height.'-coalesce null:(alphabets / 1 / egif -coalesce)-geometry +'。$ out_width。'+ 0 -layers Composite out1.gif');