-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Add ability to define pixel difference calculators #17
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
Conversation
Add default calculation method and scaled alpha calculation method.
Thanks so much, this looks good to me! Nicely done. I think this needs some documentation though, would you like to add that to the README? |
Of course, I'll try and sort that out in the next day or two. |
Sorry for the delay @meyfa - documentation has now been added to the README. |
@bennothommo No worries! This is really awesome, thank you so much for this great PR! |
This is a backport of PR #17 to the v1.x release branch. Co-Authored-By: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
This is a backport of PR #17 to the v1.x release branch. Co-Authored-By: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
This is a backport of PR #17 to the v1.x release branch. Co-Authored-By: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
This is a backport of PR #17 to the v1.x release branch. Co-Authored-By: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
This is a backport of PR #17 to the v2.x release branch. Co-Authored-By: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
This is a backport of PR #17 to the v2.x release branch. Co-Authored-By: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
This is a backport of PR #17 to the v3.x release branch. Co-Authored-By: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
This is a backport of PR #17 to the v1.x release branch. Co-authored-by: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
This is a backport of PR #17 to the v2.x release branch. Co-authored-by: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
This is a backport of PR #17 to the v2.x release branch. Co-authored-by: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
This is a backport of PR #17 to the v3.x release branch. Co-authored-by: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
This is a backport of PR #17 to the v2.x release branch. Co-authored-by: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
This is a backport of PR #17 to the v3.x release branch. Co-authored-by: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
Released as v4.1.0 🎉 - and backported to v3.1.0, v2.2.0, v1.3.0. |
As discussed in #16, this adds the ability to define calcuators for determining the difference between two images at given pixel co-ordinates. It maintains backwards compatibility by using the current method of pixel difference calculation and adding an additional optional parameter to the
assertSimilarGD
andassertNotSimilarGD
methods.Users of this library will be able to define custom calculation methods by implementing the
AssertGD\DiffCalculator
interface and providing an instance of the custom calculator as the 5th parameter to the above methods.It should hopefully be written in a way that it can be backported to older versions of this library. Happy to change the naming if there are better alternatives.