Fix visual-check pixel diff for ImageMagick 7 output
Merged
AW
2d ago+8+8+0123456789-4-4-0123456789
Problem
ubuntu-latest now runs Ubuntu 26.04 with ImageMagick 7 (imagemagick-7.q16).
For identical images, compare -metric AE prints 0 (0) on ImageMagick 7 instead of 0 on ImageMagick 6, causing the strict [ "$PIXELS" != "0" ] check in visual-check to fail on every showcase PNG despite zero differing pixels.
Change
.github/workflows/pr.yaml: Check both thecompareexit status (0) and output matching either0(ImageMagick 6) or0 (0)(ImageMagick 7), and include the exit status and output in failure warnings.
Verification
- Verified
compare -metric AEoutput and exit status locally with ImageMagick 7.1.2 (0 (0)/ exit0for identical PNGs; non-zero count / exit1for differing PNGs). - Tested the Bash check against
0,0 (0), differing pixel counts, multiline output, and non-zero exit codes on both Bash 3.2 and Bash 5. - Validated
.github/workflows/pr.yamlYAML syntax.
Summary by cubic
Fixes the visual-check pixel diff failing on every showcase PNG when ubuntu-latest runs ImageMagick 7, which prints 0 (0) for identical images instead of 0.
The check now targets ImageMagick 7 output only: it treats 0 (0) with exit status 0 as identical, reports higher pixel counts as pixel diffs, and reports exit codes above 1 or unexpected output as compare failures.