2021-04-21 17:49:30 +00:00
|
|
|
#!/bin/sh
|
|
|
|
while true
|
|
|
|
do case $1 in
|
2021-11-25 12:57:02 +00:00
|
|
|
(-o) out="$2"; shift 2;;
|
|
|
|
(-q) quality="$2"; shift 2;;
|
2021-04-21 17:49:30 +00:00
|
|
|
(*) break;;
|
|
|
|
esac
|
|
|
|
done
|
2021-11-25 12:57:02 +00:00
|
|
|
test $# -eq 0 && echo "Usage: $0 [-q quality (default 85)] [-o outfile] <images...>" && exit 1
|
|
|
|
magick "$@" -strip -interlace Plane -define jpeg:dct-method=float -sampling-factor 4:2:0 -gaussian-blur 0.05 -quality "${quality:-85}" "$out"
|
2021-04-21 17:49:30 +00:00
|
|
|
|