1
0
Fork 0

zsh: img-placeholder

This commit is contained in:
Jeremy Kaplan 2021-04-06 13:27:17 -07:00
commit 76acbfea5a

View file

@ -80,3 +80,15 @@ mov2gif() {
relpath() {
realpath --relative-to=. "$1"
}
img-placeholder() {
local size="$1" # WxH
local outfile=''
if [ "$#" -gt 1 ]; then
outfile="$2"
else
outfile="${size}.png"
fi
magick -size "${size}" -background lime -gravity Center caption:"${size}" "${outfile}"
echo "${outfile}"
}