Skip to content

Load images with ImageIO in the PR commenter - #24

Merged
baggepinnen merged 1 commit into
masterfrom
fb/imageio-loader
Nov 19, 2026
Merged

baggepinnen merged 1 commit into
masterfrom
fb/imageio-loader

Conversation

@baggepinnen

Copy link
Copy Markdown
Member

The comparison posted on JuliaControl/ControlSystems.jl#1106 (comment) reported a difference of 1.0 for all 11 figures, although the figures were unchanged.

Cause: ImageMagick_jll v7.1.2001 requires libgs.so.9, while the resolver installs Ghostscript_jll v10.8.0, which provides libgs.so.10. ImageMagick fails to initialize (run log), load throws in VisualRegressionTests.compare_images, and the result has status PROCESSING_ERROR with diff = 1.0. The commenter printed this diff as if it were a measured difference.

Changes in utils/pr_commenter.jl:

  • Install ImageIO instead of ImageMagick. FileIO uses ImageIO (PNGFiles) for PNG files when it is installed, so ImageMagick is no longer used for loading.
  • Report the status instead of the difference for results with PROCESSING_ERROR, and print the corresponding errors in the log.

Verified locally (under xvfb-run, with the same package versions as the CI run) against ControlSystems master: all 11 figures load and the differences are between 0.005 and 0.049. Five of them exceed the tolerances in gen_figures (0.02 to 0.03); these are rendering differences between the reference machine and the current environment, not caused by the PR.


Host: demeter2, session 5a6c4396-72cd-4580-a020-cb80f89c3346, working directory ~/repos/ControlExamplePlots.jl

🤖 Generated with Claude Code

ImageMagick_jll v7.1.2001 requires libgs.so.9, which the resolved
Ghostscript_jll v10 does not provide. Loading every image therefore
failed, VisualRegressionTests returned PROCESSING_ERROR with a
difference of 1.0, and the PR comment reported 1.0 for every figure.

FileIO loads PNG files with ImageIO when it is installed, so the
script now installs ImageIO instead of ImageMagick. The comment now
reports the status instead of the difference for results with
PROCESSING_ERROR, and the log prints the corresponding errors.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@baggepinnen
baggepinnen merged commit 7e6890e into master Nov 19, 2026
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