feat: Add percentage parameter to resize_images function
This commit is contained in:
parent
8bb49f2497
commit
02a26ba106
1 changed files with 6 additions and 1 deletions
|
|
@ -23,9 +23,14 @@
|
|||
fish_greeting = "fortune -a";
|
||||
ng = "nvim -c \"Neogit\"";
|
||||
resize_images = ''
|
||||
set -l percentage $argv[1]
|
||||
if test -z "$percentage"
|
||||
set percentage 40
|
||||
end
|
||||
|
||||
for img in (find . -type f -name "*.JPG")
|
||||
set original_size (stat -f %z "$img")
|
||||
magick convert "$img" -resize 40% "$img"
|
||||
magick convert "$img" -resize "$percentage%" "$img"
|
||||
set new_size (stat -f %z "$img")
|
||||
echo "Processed $img"
|
||||
echo "Original size: $original_size bytes"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue