Repository navigation
Add GIT_DIFF_IMAGE_FUZZ env var to fuzz all image comparisons - #2
Merged
Merged
Conversation
diff-image already supports a -f <fuzz> option, defaulting it to 5% for
JPEGs only. PNG screenshot comparisons had no way to apply fuzz, so
harmless per-run rendering noise (anti-aliasing, subpixel jitter) was
always flagged as a difference.
git_diff_image, the driver used by 'git diff-image', now reads
GIT_DIFF_IMAGE_FUZZ and forwards it as -f to diff-image, so callers can
opt PNGs (or any format) into fuzzy comparison, e.g.:
GIT_DIFF_IMAGE_FUZZ=5 git diff-image
hannesa2
added a commit
to gitx/gitx
that referenced
this pull request
Sep 30, 2026
Add GIT_DIFF_IMAGE_FUZZ env var to fuzz all image comparisons refs: hannesa2/git-diff-image#2 refs: hannesa2/screenShotScript#3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
diff-image already supports a -f option, defaulting it to 5% for JPEGs only. PNG screenshot comparisons had no way to apply fuzz, so harmless per-run rendering noise (anti-aliasing, subpixel jitter) was always flagged as a difference.
git_diff_image, the driver used by 'git diff-image', now reads GIT_DIFF_IMAGE_FUZZ and forwards it as -f to diff-image, so callers can opt PNGs (or any format) into fuzzy comparison, e.g.: