Created
August 27, 2018 17:18
-
-
Save semanticart/0e8d148c8565d64b74dcde0bcfd533d8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env bash | |
if [[ $# -eq 0 ]] ; then | |
echo 'You must provide a size' | |
exit 0 | |
fi | |
# first make the image with no content | |
convert -size $1 xc:hotpink $1.png | |
# now add in the size | |
convert -size ${width}x30 -background '#00000080' -fill white label:$1 miff:- |\ | |
composite -gravity Center -geometry +0+3 - $1.png $1.png |
There's probably a way to do this in one command rather than two passes. Feedback welcome.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
e.g.
mkimg 100x100
ormkimg 800x600