]> Sergey Matveev's repositories - dotfiles.git/blob - img/bin/my-transcode-jpg
Less .sh and more explicit my-
[dotfiles.git] / img / bin / my-transcode-jpg
1 #!/bin/sh -e
2
3 tmp=`mktemp`
4 trap "rm -f $tmp.jpg" HUP PIPE INT QUIT TERM EXIT
5 jpegtran -optimize -progressive -perfect -copy all "$1" > $tmp.jpg
6 cjxl $tmp.jpg "${1%.*}.jxl" -d 0 -e 9 --lossless_jpeg=1
7 [ -s "${1%.*}.jxl" ]