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 » 2011-04-21T18:12:12-07:00

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: 22224
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Animated GIF loss early frame when merging

Post by fmw42 » 2011-04-21T18:15:06-07:00

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 » 2011-04-21T18:18:54-07:00

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: 22224
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Animated GIF loss early frame when merging

Post by fmw42 » 2011-04-21T18:20:29-07:00

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 » 2011-04-21T18:28:46-07:00

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: 22224
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Animated GIF loss early frame when merging

Post by fmw42 » 2011-04-21T18:29:52-07:00

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 » 2011-04-21T18:32:44-07:00

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