Skip to content

Commit

Permalink
use magick instead of convert if available
Browse files Browse the repository at this point in the history
  • Loading branch information
Kangie committed Oct 20, 2024
1 parent 39d69a1 commit aa41c83
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/html/driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ if [ ! -e $DILLOBIN ]; then
exit 1
fi

magick_bin="convert"
if command -v magick 2>&1 >/dev/null; then
magick_bin="magick"
fi

function render_page() {
htmlfile="$1"
outpic="$2"
Expand All @@ -35,7 +40,7 @@ function render_page() {
echo "cannot find Dillo window" >&2
exit 1
fi
xwd -id "$winid" -silent | convert xwd:- png:${outpic}
xwd -id "$winid" -silent | ${magick_bin} xwd:- png:${outpic}

kill "$dillopid"
}
Expand Down

0 comments on commit aa41c83

Please sign in to comment.