Create text mask using ImageMagick

412 views Asked by At

I need to create an image from some background and text, like:

example

I try

convert -size 320x100 xc:transparent \
        -font Arial -pointsize 72 -tile "bg.jpg" \
        -annotate +28+68 'Some text' clear.png

but this does not work.

1

There are 1 answers

0
focog77269 On

Use the following command:

magick -gravity center input.jpg ( +clone -threshold 101% -fill white -font berlin-sans-fb-bold -pointsize 124 -draw "text 0,0 Hello" ) -alpha off -compose copyopacity -composite -trim output.png