Skip to content

Commit

Permalink
Use magick instead of convert if available
Browse files Browse the repository at this point in the history
This suppresses a warning on more modern systems while preserving
the ability of older systems and CI/CD to run the test suite.

> WARNING: The convert command is deprecated in IMv7, \
> use "magick" instead of "convert" or "magick convert"

Signed-off-by: Matt Jolly <[email protected]>
  • Loading branch information
Kangie authored and rodarima committed Nov 13, 2024
1 parent 3af0530 commit d26ad8f
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 d26ad8f

Please sign in to comment.