Skip to content

Instantly share code, notes, and snippets.

@ibaaj
Created May 16, 2016 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ibaaj/7b0699e5e14bcef5685b7189e738c2ef to your computer and use it in GitHub Desktop.
Save ibaaj/7b0699e5e14bcef5685b7189e738c2ef to your computer and use it in GitHub Desktop.
TextBuilding.sh
#!/bin/bash
W=`identify ./img.jpg | cut -f 3 -d " " | sed s/x.*//` #width
H=`identify ./img.jpg | cut -f 3 -d " " | sed s/.*x//` #height
convert -size ${W}x${H} xc:black -fill white -stroke black -draw "path 'M +780+1000 +2075+1054 +2431+3115 +80+2865" mask.png
convert img.jpg mask.png -alpha off -compose CopyOpacity -composite final.png
convert final.png -fuzz 45% -transparent white text.png
x="convert img.jpg " #" tttt.png -composite "
for i in `seq 0 5 500`
do
x="$x text.png -geometry +0-${i} -composite "
done
x="$x EXITSUCCESS.png"
echo $x
eval $x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment