Created
February 26, 2022 12:14
-
-
Save Wikinaut/2572b0300464948ed06c9133d932e285 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# create a semi-transparent circle image with an annotation text | |
echo "circle <text> <circlesize> <fillcolor> <opacity>" | |
magick -size "$2"x"$2" \ | |
xc:none -stroke black -strokewidth 2 -fill "$3" \ | |
-draw 'circle %[fx:w/2],%[fx:h/2] %[fx:w/2],%[fx:h]' \ | |
-alpha set -channel A -evaluate Multiply "$4" +channel \ | |
-set pt %[fx:h/1.5] \ | |
-set ofs %[fx:h/18] \ | |
-pointsize %[pt] -gravity center -fill black -annotate +0+%[ofs] "$1" \ | |
"circle-${1}.png" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment