Skip to content

Instantly share code, notes, and snippets.

@LeiHao0
Last active March 14, 2021 02:43
Show Gist options
  • Save LeiHao0/edf74b41b597bcd2c066e8172378ad10 to your computer and use it in GitHub Desktop.
Save LeiHao0/edf74b41b597bcd2c066e8172378ad10 to your computer and use it in GitHub Desktop.
#!/bin/zsh
echo "{% gp - %}"
n=01
for i in img/*.jpeg
do
# convert -resize x1080 $i $1-a.jpg
# convert -resize x1080 -quality 80 -strip $i img/$1-$n.jpg &
magick $i -resize x1080 -quality 50 -strip img/$1-$n.webp &
n=$(printf "%02d" $((n + 1)))
done
echo "{% endgp %}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment