Thank you both.
Anthony, I tried the examples at the link you provided but could not get anything to work. I think that -fx might be the best tool, but I did not understand how to use it.
I use the following code to DYNAMICALLY create a button:
Code: Select all
## Based on this: http://www.imagemagick.org/Usage/advanced/#3d-logos-2
## Thanks, Anthony!
convert -background transparent -fill transparent \
-pointsize 12 label:'Hello Cruel World' \
-format 'viewbox 0 0 %[fx:w+7] %[fx:h+7] \
fill white roundRectangle 1,1 %[fx:w+5] %[fx:h+5] \
5,5' \
info: > rounded_corner.mvg
convert -background black +antialias rounded_corner.mvg mask.png
convert mask.png -fill pink -draw 'color 0,0 reset' \
mask.png +matte -compose CopyOpacity -composite \
-pointsize 11 -fill black +antialias \
-gravity Center -annotate 0 "Hello Cruel World" \
button.png
convert button.png -fx A +matte -blur 0x2 -shade 110x30 -normalize \
button.png -compose Overlay -composite \
button.png -matte -compose Dst_In -composite \
3dButton.png
The problem is that the button is pink. I want the button to start out green in the top left corner and end up yellow in the bottom right corner.
So I need a gradient at a 135° degree angle.