Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION]: How to ignore size_mismatch #218

Open
svccsotest10 opened this issue Feb 22, 2022 · 4 comments
Open

[QUESTION]: How to ignore size_mismatch #218

svccsotest10 opened this issue Feb 22, 2022 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@svccsotest10
Copy link

Is there a way to ignore size_mismatch state while doing comparisons?

@svccsotest10 svccsotest10 added the question Further information is requested label Feb 22, 2022
@adrian-herscu
Copy link

Maybe...?

if(small < large)
  large
    .scaleDown(small.width, small.height)
    .compareTo(small)
    .withPixelTolerance(xxx)

@kumarvinay22
Copy link

@adrian-herscu I was using this library for image comparison and wanted to ignore the SIZE_MISMATCH to compare the images. I saw your solution but not sure how to implement it in my project. Is it possible for you to help out?

@adrian-herscu
Copy link

adrian-herscu commented Apr 22, 2023

It is pseodo-code... For scaling down you can see my code at: https://github.com/QA-Automation-Starter/qa-automation/blob/main/qa-tester-utils/src/main/java/dev/aherscu/qa/tester/utils/ImageUtils.java
The real issue is with the "withPixelTolerance" method...

@kumarvinay22
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants