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

markign differrence with rectangle #234

Open
apathan123 opened this issue Jul 27, 2021 · 6 comments
Open

markign differrence with rectangle #234

apathan123 opened this issue Jul 27, 2021 · 6 comments

Comments

@apathan123
Copy link

apathan123 commented Jul 27, 2021

Is it possible to mark diff area with rectangle instead of some solid color
OR
is ti possible to get marking on x,y co ordinates in image where the diff is identified

@apathan123
Copy link
Author

@valfirst - CAn you please help me in this case

@valfirst
Copy link
Collaborator

valfirst commented Aug 5, 2021

with rectangle instead of some solid color

sorry, could you please elaborate on this?

is ti possible to get marking on x,y co ordinates in image where the diff is identified

do you need to get the coordinates (x, y) of the all found diffs?

@apathan123
Copy link
Author

with rectangle instead of some solid color

sorry, could you please elaborate on this?

is ti possible to get marking on x,y co ordinates in image where the diff is identified

do you need to get the coordinates (x, y) of the all found diffs?

Yes. Basically when there is very small diff on the screen then its difficult to locate. So if we can have the area of diff marked as rectangle that will be really helpful.

@adrian-herscu
Copy link

https://github.com/romankh3/image-comparison
this one draws rectangles

val imageDiff = new ImageComparison(
      read(getRelativeResourceAsStream(getClass(),
          "example.png")),
      read(getRelativeResourceAsStream(getClass(),
          "example-different.png")));

val d = imageDiff
    .setDifferenceRectangleFilling(true, 10)
    .compareImages();

try (val o = new FileOutputStream("diff.png")) {
    write(d.getResult(), "png", o);
}

assertThat(d.getImageComparisonState(),
    is(MISMATCH));

@apathan123
Copy link
Author

Thanks so much @adrian-herscu ! Will give a try but looks exactly
what I was looking for!

@adrian-herscu
Copy link

Thanks so much @adrian-herscu ! Will give a try but looks exactly what I was looking for!

You're welcome :)
Actually, I don't know why this library does comparison at all... Maybe join forces somehow?...

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

No branches or pull requests

3 participants