i'm trying to add some animated gif into static imag开发者_运维技巧e (canvas), here's my start code
exec("convert canvas.gif animated.gif result.gif");
with that code, animated gif will placed on top left canvas.
My question is how to make adjustment position of animated in canvas area and maybe resize this animated gif before merge?
Please note, with code above, will add 1 frame extra to result, i dont know how to fix this :(
Update: My latest code on PHP
$cmd = "convert $animation -gravity center -geometry +0+5 null: $watermark -layers composite -layers optimize GIF:-";
header("Content-type: image/gif");
passthru($cmd, $retval);
Now frames are same with animated source, but sometimes GIF like loosing background frame :( this is image example for finish result
http://i.stack.imgur.com/xxGzV.gif
How to make background frame looping forever?
Thanks and regards nb: sorry for bad english ..lol
try:
convert background.jpg animation.gif -loop 0 new_animation.gif
精彩评论