This is about transforming any symbol to an image, so the rich catalog of numbers, characters and icons is available in a graphic format. The `convert` command does the job nicely, like this:
Code: Select all
convert -size 50x50 xc:transparent -pointsize 30 -annotate +10+33 "O" output.png
Now, this generates a black character on a transparent canvas. In order to also handle colors, there should be foreground and background colors, mapping the symbol's black to a specified color, and the area surrounded by black to any other color. For example, this would generate a (black over transparent) football ball:
Code: Select all
convert -size 50x50 xc:transparent -font "/usr/share/fonts/truetype/ancient-scripts/Symbola_hint.ttf" -pointsize 30 -fill black -annotate +10+33 "⚽" ball.png
What would be the parameters to change black, and inner white into any given colors, leaving the surrounding area transparent?