Composite images with wildcard and transparency

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
Bingo
Posts: 24
Joined: 2007-03-26T03:43:14-07:00

Composite images with wildcard and transparency

Post by Bingo »

Hi all !

I am trying to overlay 3 PNGs in one command.
They all have a white background that must be used as transparent color.
They are also named with the same pattern : image_XXXXX_tmp.png

I tried with this command, but one of the images does not appear in the final image :

convert image_*_tmp.png -transparent white -composite merge.png

merge.png looks good, but only the first 2 of the 3 images (in alphabetical order) are visible.
Is my command syntax wrong ?

Thanks a lot for your help !
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Composite images with wildcard and transparency

Post by fmw42 »

-composite only allows two images and a mask. try -flatten or -layers merge

http://www.imagemagick.org/script/comma ... php#layers
http://www.imagemagick.org/Usage/layers/
Bingo
Posts: 24
Joined: 2007-03-26T03:43:14-07:00

Re: Composite images with wildcard and transparency

Post by Bingo »

-layers merge works great, thanks a lot !
Post Reply