Skip to content

Instantly share code, notes, and snippets.

@XIO1986
Forked from monkeywithacupcake/catchphrase.sh
Created December 31, 2021 11:30
Show Gist options
  • Select an option

  • Save XIO1986/3023f6343d47689327cd6136e058d02f to your computer and use it in GitHub Desktop.

Select an option

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