From 72c197f55b456e4620e6f1ba1fe9c4391cfd8c12 Mon Sep 17 00:00:00 2001
From: Sergey Matveev <stargrave@stargrave.org>
Date: Sun, 19 Sep 2021 22:19:59 +0300
Subject: [PATCH] Latest cjxl supports stdin/stdout

---
 img/bin/transcode-jpg.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

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" ]
-- 
2.51.0