Animated GIF loss early frame when merging

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
ghprod
Posts: 4
Joined: 2011-04-21T17:45:14-07:00
Authentication code: 8675308

Animated GIF loss early frame when merging

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Animated GIF loss early frame when merging

Post 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
Last edited by fmw42 on 2011-04-21T18:19:57-07:00, edited 1 time in total.
ghprod
Posts: 4
Joined: 2011-04-21T17:45:14-07:00
Authentication code: 8675308

Re: Animated GIF loss early frame when merging

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Animated GIF loss early frame when merging

Post 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
ghprod
Posts: 4
Joined: 2011-04-21T17:45:14-07:00
Authentication code: 8675308

Re: Animated GIF loss early frame when merging

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Animated GIF loss early frame when merging

Post 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?
ghprod
Posts: 4
Joined: 2011-04-21T17:45:14-07:00
Authentication code: 8675308

Re: Animated GIF loss early frame when merging

Post 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 :)
Post Reply