Overlay multiple images

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
pdoak
Posts: 8
Joined: 2019-03-14T07:02:23-07:00
Authentication code: 1152

Overlay multiple images

Post by pdoak »

Version: ImageMagick 7.0.8-28 Q16 x86_64 2019-02-19

I am new to ImageMagick and am struggling to overlay multiple images using the command line. Each image is the same size.

I can overlay one image on top of another using:

Code: Select all

convert all.png image.png -gravity center -composite all.png        
but I am struggling to overlay more the one image at a time. Intuitively, I want to do this:

Code: Select all

convert all.png image.png image2.png image3.png ....etc -gravity center -composite all.png 


Please could someone tell me what the correct format is.

Many thanks
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Overlay multiple images

Post by snibgo »

Instead of "-composite", use "-background None -layers Flatten". See http://www.imagemagick.org/script/comma ... php#layers
snibgo's IM pages: im.snibgo.com
pdoak
Posts: 8
Joined: 2019-03-14T07:02:23-07:00
Authentication code: 1152

Re: Overlay multiple images

Post by pdoak »

That worked! Thank you
Post Reply