mirror of
https://github.com/Steffo99/config-fish.git
synced 2024-12-22 14:54:23 +00:00
Add pad-image function
This commit is contained in:
parent
526504fe0c
commit
1be4fe9a77
1 changed files with 10 additions and 0 deletions
10
functions/pad-image.fish
Normal file
10
functions/pad-image.fish
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
which magick --skip-functions >/dev/null 2>/dev/null
|
||||||
|
if [ $status -eq 0 ]
|
||||||
|
function pad-image
|
||||||
|
log-t "Creating" "Images padded to $argv[1]" "directory..."
|
||||||
|
command mkdir --parents "Images padded to $argv[1]"
|
||||||
|
log-d "Padding" "$argv[3]" "to $argv[1]..."
|
||||||
|
command magick -background "$argv[2]" "$argv[3]" -resize "$argv[1]" -gravity "center" -extent "$argv[1]" $argv[4..-1] "Images padded to $argv[1]/$argv[3]"
|
||||||
|
log-t "Done! Emoji added to the" "Images padded to $argv[1]" "directory!"
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue