zsh: img-placeholder
This commit is contained in:
parent
8aebf3da77
commit
76acbfea5a
1 changed files with 12 additions and 0 deletions
12
zsh/aliases
12
zsh/aliases
|
|
@ -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}"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue