Page 1 of 1

overlay many pngs

Posted: 2017-08-23T18:17:27-07:00
by phaethon100
Hi experts!

I have a script which creates pngs that i want to overlay.
With two pngs this works fine:

Code: Select all

convert -composite -compose Multiply lay_3.png   lay_4.png out.png 
No problem at all!

BUT
The problem is that with many pngs it doesnt work e.g. :

Code: Select all

 convert -composite -compose Multiply lay_1.png  lay_2.png lay_3.png   lay_4.png out.png
will only overlay the first 2 pngs.


Idealy I want something like:

Code: Select all

convert -composite -compose Multiply lay_*.png  out.png
to work, because some files e.g. lay_1.png and lay_3.png might be missing
How can it be done??

Re: overlay many pngs

Posted: 2017-08-23T19:06:11-07:00
by fmw42
try

Code: Select all

convert lay_*.png -evaluate-sequence multiply out.png
See
http://www.imagemagick.org/script/comma ... e-sequence

Re: overlay many pngs

Posted: 2017-08-24T01:29:22-07:00
by phaethon100
Thank you for your reply and time.

Your solution gave me a blank page, but somehow inspired me to find a solution doing:

Code: Select all

convert  lay_*.png  -compose multiply   -repage 1200x1200-1-1 -flatten out2.png
which for my case worked fine.

Cheers!