Improve luma*-to-png with support for multiple filename arguments :D
This commit is contained in:
parent
59d8a75135
commit
6ee96690b6
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
|||
#!/bin/zsh
|
||||
date=${1%_*.bmp}
|
||||
magick ${date}_top.bmp ${date}_bot.bmp -alpha set -gravity Center -background 'rgba(0,0,0,0)' -append ${date}.png
|
||||
for date in ${(u)argv[@]%_*.bmp}; do
|
||||
magick ${date}_top.bmp ${date}_bot.bmp -alpha set -gravity Center -background 'rgba(0,0,0,0)' -append ${date}.png || exit $?
|
||||
done
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
#!/bin/zsh
|
||||
magick $1 -alpha set -fill 'rgba(0,0,0,0)' -draw 'color 0,0 point' $1:r.png
|
||||
for src in $argv; do
|
||||
dest=$src:r.png
|
||||
[[ $src = *.png ]] && dest=${src:r}_twitter.png
|
||||
magick $src -alpha set -fill 'rgba(0,0,0,0)' -draw 'color 0,0 point' $dest || exit $?
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue