From: Sergey Matveev Date: Sun, 19 Sep 2021 19:19:59 +0000 (+0300) Subject: Latest cjxl supports stdin/stdout X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=commitdiff_plain;h=72c197f55b456e4620e6f1ba1fe9c4391cfd8c12 Latest cjxl supports stdin/stdout --- diff --git a/img/bin/transcode-jpg.sh b/img/bin/transcode-jpg.sh index 1f0977d..fab9e38 100755 --- a/img/bin/transcode-jpg.sh +++ b/img/bin/transcode-jpg.sh @@ -1,6 +1,5 @@ #!/bin/sh -e -trap "rm -f \"$1\".jpegtran.jpg" HUP PIPE INT QUIT TERM EXIT -jpegtran -optimize -progressive -perfect -copy all "$1" > "$1".jpegtran.jpg -cjxl "$1".jpegtran.jpg "${1%.*}.jxl" -q 100 -e 9 +jpegtran -optimize -progressive -perfect -copy all "$1" | + cjxl - "${1%.*}.jxl" -q 100 -e 9 [ -s "${1%.*}.jxl" ]