bevanb
bevanb

Reputation: 8521

Superimpose a transparent PNG on a GIF animation

I want to add watermark images to GIF animations with ImageMagick.

The following doesn't work: it just gives produces a weird single image with crazy colors, and the transparent-watermark.png doesn't seem to be there at all.

composite -compose Dst_Over background-gif.gif transparent-watermark.png final.gif

How can this be accomplished? It's similar to annotating but with an image instead of text.

Upvotes: 1

Views: 954

Answers (2)

lucasgabmoreno
lucasgabmoreno

Reputation: 1031

I've had same problem with

convert -delay 4 -loop 0 *.png animated.gif

And fix it adding -alpha remove

convert -delay 4 -loop 0 *.png -alpha remove animated.gif

Try -alpha remove or -background white(other cases) to fix it.

Upvotes: 1

bevanb
bevanb

Reputation: 8521

convert background-animation.gif -coalesce -gravity NorthEast -draw 'image over 0,0 0,0 "transparent-watermark.png"' -layers Optimize final.gif

Upvotes: 1

Related Questions