'ImageMagick: Put curved text over image
I want to use ImageMagick to annotate images with curved text. Creating curved text on a plain image works:
convert -size 600x500 xc:white -pointsize 72 -fill red -annotate +100+200 "C H E S S" -distort Arc 100 test.png
But when I try to put the text on top of another image, the background image gets curved as well:
convert checker.png \( -pointsize 72 -fill red -annotate +100+200 "C H E S S" -distort Arc 100 \) test.png
How can I avoid curving the background image and only curve the text?
Update: GeeMack's answer suggested something like this:
convert \
-pointsize 72 -fill red -background none label:"C H E S S" \
-virtual-pixel none -distort Arc 100 \
checker.png +swap \
-gravity center -geometry +0-100 -composite result.png
But now, I get white text instead of red:
Solution 1:[1]
You can create the text as a label first, and do the arc distortion on just that. Then create the background canvas, set the gravity and geometry, and composite the label onto the canvas. Here is an example command using IMv6 that might get you started...
convert \
-pointsize 72 -fill red -background none label:"C H E S S" \
-virtual-pixel none -distort Arc 100 \
-size 600x500 pattern:bricks +swap \
-gravity center -geometry +0-100 -composite result.png
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | GeeMack |