Skip to content

Add utility method to compare images ignoring size mismatch#253

Open
darshan3131 wants to merge 1 commit into
romankh3:masterfrom
darshan3131:feat/ignore-size-mismatch-218
Open

Add utility method to compare images ignoring size mismatch#253
darshan3131 wants to merge 1 commit into
romankh3:masterfrom
darshan3131:feat/ignore-size-mismatch-218

Conversation

@darshan3131

@darshan3131 darshan3131 commented Apr 1, 2026

Copy link
Copy Markdown

Summary

  • Add ImageComparisonUtil.compareImagesIgnoringSizeMismatch(expected, actual) to support content comparison when image dimensions differ.
  • Keep existing behavior unchanged (ImageComparison.compareImages() still returns SIZE_MISMATCH for different dimensions).
  • Add a focused unit test and README usage example to document and validate the new helper.

Closes #218.

Test plan

  • mvn test
  • mvn -Dtest=ImageComparisonUtilUnitTest test
  • mvn clean package -Dmaven.javadoc.skip=true

Provide a utility method to resize actual image to expected dimensions before comparison, with tests and README usage guidance so users can intentionally bypass SIZE_MISMATCH for content-focused checks.

Made-with: Cursor
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.

[QUESTION]: How to ignore size_mismatch

1 participant