How to overlay two images, one with transparent background in imagemagick

I have two pictures:

  • first one is a foreground.png with a transparent background
  • second one is a background.jpg

I would like to put them on top of each other in a way that the .jpg is "beneeth" and the .png "on top". So that the .jpg parts are only visible in the transparent parts of the .png.

Thanks in advance

Read more here:

Content Attribution

This content was originally published by Dimitri Taits at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: