Page 1 of 1

how to composite them in one command?

Posted: 2008-06-24T17:40:33-07:00
by blackgun
Hi,
I searched the forum and did not find the answer.

Now, I make a image like this by 3 steps
Image

1. text mask
convert -size 300x60 -background none -fill black \
-font './impact.TTF' -pointsize 72 label:'This is a Mask' mask1.png

2. ellipse
convert -size 300x60 xc:skyblue -fill red -stroke black -draw "ellipse 150,30 100,30 0,360" draw_ellipse.png

3. composite
composite -compose Dst_In -gravity center mask1.png draw_ellipse.png compose_mask.png

How can I do this by one command?
Thanks

Re: how to composite them in one command?

Posted: 2008-06-24T18:56:43-07:00
by el_supremo
This will do it:

Code: Select all

convert -compose Dst_In -gravity center -size 300x60 xc:skyblue \
	-fill red -stroke black -draw "ellipse 150,30 100,30 0,360" \
	( -size 300x60 -background none -fill black -font './impact.TTF'  \
	-pointsize 72 label:'This is a Mask' ) -composite compose_mask.png
Pete

Re: how to composite them in one command?

Posted: 2008-06-25T16:02:53-07:00
by blackgun
Great ! It works!
Thank Pete :D