Re: Merging 2 gifs, one is animated and transparent
Posted: 2015-07-31T00:34:15-07:00
Reviving an old thread... I have a question similar to what was asked above.
I have a JPEG image of say 400x300px. I have a small animated GIF of say 100x50px.
I want to overlay the animated GIF over the JPG, which should result in an animated GIF. The GIF should have the same width/height as the JPEG image (400x300px in this particular example).
I tried:
Which is close to what I want: output.gif shows the animation (smallAnim.gif) over the background image (background.jpg), and it animates correctly, but the resulting image has the width/height of smallAnim.gif. It's too small.
When I want to position the animation to a certain x,y coordinate:
It gets worse; output.gif only shows the animation, the background image is not visible.
How can I make this work properly, without reverting to merging the images frame-by-frame (which works, but is cumbersome).
I have a JPEG image of say 400x300px. I have a small animated GIF of say 100x50px.
I want to overlay the animated GIF over the JPG, which should result in an animated GIF. The GIF should have the same width/height as the JPEG image (400x300px in this particular example).
I tried:
Code: Select all
convert smallAnim.gif -coalesce -draw "image DstOver 0,0 0,0 background.jpg" -layers Optimize output.gif
When I want to position the animation to a certain x,y coordinate:
Code: Select all
convert smallAnim.gif -coalesce -draw "image DstOver 150,125 0,0 background.jpg" -layers Optimize output.gif
How can I make this work properly, without reverting to merging the images frame-by-frame (which works, but is cumbersome).