Skip to content

Instantly share code, notes, and snippets.

@james-huston
Last active August 29, 2015 14:14
Show Gist options
  • Save james-huston/f217dcfb968f150c8907 to your computer and use it in GitHub Desktop.
Save james-huston/f217dcfb968f150c8907 to your computer and use it in GitHub Desktop.
Generate an image with text in it to look like an sms using ImageMagick
#!/bin/bash
cat test.txt | \
convert -background '#44aff7' -fill white -size 250x5000 -trim +repage -font AvantGarde-Book -pointsize 16 caption:@- miff:- |\
#convert -background blue \
# -size $((`identify -format %w test_tmp.png` + 20))x$((`identify -format %h test_tmp.png` + 20)) \
# xc: test_tmp.png -flatten test.png
convert - -bordercolor '#44aff7' -border 10x10 test.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment