From b71fa7cdf1cc04730382f1b7685fa887da6d25e9 Mon Sep 17 00:00:00 2001 From: Ingo Meyer Date: Tue, 13 May 2025 16:24:54 +0200 Subject: [PATCH] Check directly if `compare` belongs to ImageMagick or GraphicsMagick ImageMagick and GraphicsMagick can be installed in parallel, so don't really on checking for `gm` existence to decide if `compare` calls GraphicsMagick or ImageMagick code. --- diff-image | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diff-image b/diff-image index 0f6a316..902b126 100755 --- a/diff-image +++ b/diff-image @@ -208,7 +208,7 @@ fi density_flag= do_compare() { - if which gm > /dev/null + if compare --version | head -1 | grep -q "GraphicsMagick" then echo "NOTICE: GraphicsMagick does not support 'compare -fuzz', so omitting it" compare $density_flag $color_flag $backgroundcolor_flag -file png:- "$f1" "$f2" | \