Page 1 of 1

Animated GIF loss early frame when merging

Posted: 2011-04-21T18:12:12-07:00
by ghprod
Hi,

i try to merge
- animated GIF (http://s4.postimage.org/n13gxobo/logo_glittered.gif)
Image
- static background JPG (http://s4.postimage.org/szwq60bpx/image.jpg)
Image


This is my code

Code: Select all

<?php 

$cmd = "convert image.jpg -gravity center -geometry +0+5 null: logo_glittered.gif -layers composite -layers optimize GIF:-";

header("Content-type: image/gif");
passthru($cmd, $retval);

?>
This is final result
Image

As you can see, animated GIF loss background frame or maybe init frame?

Nah, how to fix this? so animated get smooth frames ..

Thanks for your respond and help :)
Regards

Re: Animated GIF loss early frame when merging

Posted: 2011-04-21T18:15:06-07:00
by fmw42
this should be reposted in the User's forum as it has nothing to do with Magic++

try this


convert image.jpg \
null: \
\( logo_glittered.gif -coalesce \) \
-gravity center -geometry +0+5 -layers Composite \
-layers Optimize \
test.gif


see http://www.imagemagick.org/Usage/anim_m ... ite_single

Re: Animated GIF loss early frame when merging

Posted: 2011-04-21T18:18:54-07:00
by ghprod
fmw42 wrote:this should be reposted in the User's forum as it has nothing to do with Magic++
Hi sorry for posted in wrong section, please admin move this thread into new room :)
regards

Re: Animated GIF loss early frame when merging

Posted: 2011-04-21T18:20:29-07:00
by fmw42
try this


convert image.jpg \
null: \
\( logo_glittered.gif -coalesce \) \
-gravity center -geometry +0+5 -layers Composite \
-layers Optimize \
test.gif


see http://www.imagemagick.org/Usage/anim_m ... ite_single

Re: Animated GIF loss early frame when merging

Posted: 2011-04-21T18:28:46-07:00
by ghprod
fmw42 wrote:try this


convert image.jpg \
null: \
\( logo_glittered.gif -coalesce \) \
-gravity center -geometry +0+5 -layers Composite \
-layers Optimize \
test.gif


see http://www.imagemagick.org/Usage/anim_m ... ite_single
Hi Fred, thanks for very very quick reply :)

i've tried but animated GIF not appear in result .. did i miss something in http://imagemagick.org/Usage/anim_mods/ ... ite_single section?
i want to fix this but i dont know "imagick terms" for this problem :(

Thanks and regards

Re: Animated GIF loss early frame when merging

Posted: 2011-04-21T18:29:52-07:00
by fmw42
The code above worked just fine for me on IM 6.6.9.5 Q16 Mac OSX Tiger when I display test.gif in my browser. Perhaps you need to upgrade your IM. What version of IM are you using and on what platform?

Re: Animated GIF loss early frame when merging

Posted: 2011-04-21T18:32:44-07:00
by ghprod
Hi Fred, its work now .. i dont know if single space would be some problem for proccess ... thank all .. case solved!

this is my final code

Code: Select all

<?php 

$cmd = "convert image.jpg null: ( logo_glittered.gif -coalesce ) -gravity center -geometry +0+5 -layers composite -layers optimize GIF:-";

header("Content-type: image/gif");
passthru($cmd, $retval);

?>
Thanks and regards :)