Advertisement
Guest User

Untitled

a guest
Nov 28th, 2012
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. # This file renders the supplied text string with imagemagick
  2. # and dumps it into the supplied filename
  3. #
  4. # usage: renderfont.sh <filename> <color> <multi word string>
  5.  
  6. filename=$1
  7. color=$2
  8.  
  9. string=$(echo $*|cut -f 3- -d " " | sed "s/'/\\\'/g" )
  10.  
  11. echo $string
  12.  
  13. convert +dither -size 720x480 xc:transparent -fill $color \
  14. -stroke black -strokewidth 3.5 -font "Bitstream-Vera-Sans-roman" \
  15. -pointsize 20 -gravity South -colors 4 -draw "text 0,40 '${string}'" \
  16. +stroke -draw "text 0,40 '${string}'" -channel A -threshold 255 \
  17. -colors 4 -contrast png8:$filename
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement