Created
September 8, 2018 13:56
-
-
Save monkeywithacupcake/9e0092733302668b2a4adbbfb1d35748 to your computer and use it in GitHub Desktop.
A shell script to generate an Image with text
This file contains 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
#!/bin/zsh | |
# Asks a series of questions and then returns an image | |
# use like "bash catchphrase.sh" | |
echo "What is your favorite color?" | |
read theColor | |
echo "What is your catchphrase?" | |
read thePhrase | |
convert -size 1000x1000 xc:$theColor +repage \ | |
-size 800x800 -fill white -background None \ | |
-font CourierNewB -gravity center caption:"$thePhrase" +repage \ | |
-gravity Center -composite -strip catchphraseimage.jpg | |
echo "See your special image at ${PWD}/catchphraseimage.jpg" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I went into my Font Book to find a different font, and then I used
convert -list font
to see which fonts I had available. I changed the font fromCourierNewB
toMarker-Felt-Wide
Then, I reran the program, and you can see a different result.