Created
December 27, 2012 05:14
-
-
Save yradunchev/4385655 to your computer and use it in GitHub Desktop.
add caption to picture...
This file contains 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/bash | |
[[ "$#" -eq 2 ]] || { echo "Usage: ${0} pict.ure \"caption text\"" >&2; exit 1; } | |
convert \ | |
-size $(identify -format %w ${1})x40 \ | |
-background transparent \ | |
-gravity center \ | |
-font Helvetica-Bold \ | |
-fill yellow \ | |
-pointsize 40 \ | |
caption:"${2}" ${1} \ | |
+swap \ | |
-gravity south \ | |
-composite ${1%.*}_${2}.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment