Skip to content
Snippets Groups Projects
Commit 6996253a authored by nick87720z's avatar nick87720z
Browse files

Fix shell timers usage

parent 48bd40b7
No related branches found
No related tags found
No related merge requests found
...@@ -15,9 +15,9 @@ input="$3" ...@@ -15,9 +15,9 @@ input="$3"
output="$4" output="$4"
tmpfile="${XDG_RUNTIME_DIR}/tmp_view_$(basename ${3})_$( cat /dev/urandom | tr -cd '[[:alnum:]]' | head -c10 ).png" tmpfile="${XDG_RUNTIME_DIR}/tmp_view_$(basename ${3})_$( cat /dev/urandom | tr -cd '[[:alnum:]]' | head -c10 ).png"
time convert "${input}" -sample $(( width * 3 ))x$((height * 3 ))\! \
-channel Red -morphology Convolve '3x1: 0, 0, 1' \ -channel Red -morphology Convolve '3x1: 0, 0, 1' \
-channel Blue -morphology Convolve '3x1: 1, 0, 0' \ -channel Blue -morphology Convolve '3x1: 1, 0, 0' \
env time -f '%E' convert "${input}" -sample $(( width * 3 ))x$((height * 3 ))\! \
-sample ${width}x${height}\! \ -sample ${width}x${height}\! \
-depth 16 -quality 100 -sampling-factor 1x1 "${tmpfile}" -depth 16 -quality 100 -sampling-factor 1x1 "${tmpfile}"
......
...@@ -13,7 +13,7 @@ help() { ...@@ -13,7 +13,7 @@ help() {
printf '%s\n' "Usage: $( basename $0) [--width PIXELS] [--height PIXELS] [--depth BITS] [--bands INTEGER] [--tmpdir PATH] INPUT_FILE OUTPUT_FILE" printf '%s\n' "Usage: $( basename $0) [--width PIXELS] [--height PIXELS] [--depth BITS] [--bands INTEGER] [--tmpdir PATH] INPUT_FILE OUTPUT_FILE"
} }
TIMER="time -f '%E'" TIMER="env time -f '%E'"
check_arg_missing=' check_arg_missing='
if ! shift || [ -z "$*" ] ; then if ! shift || [ -z "$*" ] ; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment