Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image magick overlaying images

Tags:

imagemagick

I have two images, one is the overlay, lets say Image A with transparency, and another image B, I have to place the overlay image A over image B, so that some part of image B is visible through the transparent part of image A, I also have to move the image B according to some parameters, How can I achieve this with image magick

like image 853
Ggmon Avatar asked Dec 17 '12 15:12

Ggmon


1 Answers

I was able to achieve it by the following command

composite -compose Dst_Over -geometry 520x320+20+80 image.jpeg overlay.png final.png

the key here -compose Dst_Over, which puts the image under the background (overlay.png) and the geometry options let you move the image.

like image 73
Ggmon Avatar answered Sep 24 '22 03:09

Ggmon