Search code examples
pythonlinuxshellimagemagickimagemagick-convert

How to cover picture in special frame using ImageMagick?




This is my source picture http://cdn.mayike.com/emotion/2017/06/06/rJuRPDQMZ.gif,

I want to add another picture into the heart space.

How can I do this using ImageMagick in a shell command?

Thanks


Solution

  • In Imagemagick, you can do the following. I am using a checkerboard image the same size as your animation to show behind the heart.

    enter image description here

    convert checks200.gif null: \( rJuRPDQMZ.gif -coalesce \) -layers composite -layers optimize new_animation.gif
    

    enter image description here

    See http://www.imagemagick.org/Usage/anim_mods/#background. If using Imagemagick 7, change convert to magick.