-
-
Save XIO1986/3023f6343d47689327cd6136e058d02f to your computer and use it in GitHub Desktop.
A shell script to generate an Image with text
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
| #!/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