Skip to content

Fix visual-check pixel diff for ImageMagick 7 output - #19

Merged
awnion merged 4 commits into
mainfrom
fix/visual-check-im7
Nov 30, 2026
Merged

awnion merged 4 commits into
mainfrom
fix/visual-check-im7

Conversation

@awnion

@awnion awnion commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

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 the compare exit status (0) and output matching either 0 (ImageMagick 6) or 0 (0) (ImageMagick 7), and include the exit status and output in failure warnings.

Verification

  • Verified compare -metric AE output and exit status locally with ImageMagick 7.1.2 (0 (0) / exit 0 for identical PNGs; non-zero count / exit 1 for 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.yaml YAML 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.

Written for commit 6ec1b1a. Summary will update on new commits.

View guided diff Turn on auto-fix

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 1 file

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread .github/workflows/pr.yaml Resolved
@greptile-apps

greptile-apps Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · The changes since the previous review appear safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The changes since the previous review appear safe to merge.

Summary

Updates the pixel check in .github/workflows/pr.yaml.

  • The visual check accepts ImageMagick 7’s output for identical images.

Reviews (3) · Last reviewed commit: "Replace regex with glob check in visual-..." · Reviewed by Greptile

@awnion
awnion merged commit 805d642 into main Nov 30, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant