$ real_time() { command time -p sh -c '{ "$@"; } 2>&3 >&2' argv0 "$@" 3>&2 2>&1 | sed -n 's#^real ##p'; } $ magick identify DSC00191.ppm DSC00191.ppm PPM 5492x3672 5492x3672+0+0 8-bit sRGB 57.6972MiB 0.090u 0:00.042 $ for s in 0 3 6; do real_time magick DSC00191.ppm -quality 100 -define heic:chroma=444 -define heic:cicp=1/13/0/1 -define heic:speed=$s DSC00191_s$s.avif; done 76.71 12.80 1.73 $ real_time magick DSC00191.ppm -quality 0 DSC00191.jp2 3.315 $ real_time sh -c 'magick "$1" -define png:compression-level=0 "$2" && oxipng -q -o2 -s "$2"' argv0 DSC00191.{ppm,png} 7.746 $ for e in 3 6 9; do real_time magick DSC00191.ppm -quality 100 -define jxl:effort=$e DSC00191_e$e.jxl; done 0.53 1.33 7.71 $ for m in 0 3 6; do real_time magick DSC00191.ppm -quality 100 -define webp:lossless=true -define webp:method=$m DSC00191_m$m.webp; done 5.86 10.41 46.03 $ du -k DSC00191* | sort -n 20068 DSC00191_e9.jxl 20608 DSC00191_e6.jxl 21324 DSC00191_m6.webp 21340 DSC00191_m3.webp 21772 DSC00191_e3.jxl 23744 DSC00191.jp2 23848 DSC00191_s0.avif 23896 DSC00191_s3.avif 24212 DSC00191_s6.avif 24556 DSC00191.png 26428 DSC00191_m0.webp 59084 DSC00191.ppm