Skip to content

Conversation

bennothommo
Copy link
Contributor

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 and assertNotSimilarGD 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.

@meyfa meyfa self-requested a review March 14, 2024 11:37
@meyfa meyfa changed the title Add ability to define pixel difference calculators feat: Add ability to define pixel difference calculators Mar 14, 2024
@meyfa
Copy link
Owner

meyfa commented Mar 14, 2024

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?

@bennothommo
Copy link
Contributor Author

Of course, I'll try and sort that out in the next day or two.

@bennothommo
Copy link
Contributor Author

Sorry for the delay @meyfa - documentation has now been added to the README.

@meyfa meyfa linked an issue Apr 16, 2024 that may be closed by this pull request
@meyfa
Copy link
Owner

meyfa commented Apr 16, 2024

@bennothommo No worries!

This is really awesome, thank you so much for this great PR!

@meyfa meyfa merged commit 8e550d0 into meyfa:main Apr 16, 2024
meyfa added a commit that referenced this pull request Apr 16, 2024
This is a backport of PR #17 to the v1.x release branch.

Co-Authored-By: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
meyfa added a commit that referenced this pull request Apr 16, 2024
This is a backport of PR #17 to the v1.x release branch.

Co-Authored-By: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
meyfa added a commit that referenced this pull request Apr 16, 2024
This is a backport of PR #17 to the v1.x release branch.

Co-Authored-By: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
meyfa added a commit that referenced this pull request Apr 16, 2024
This is a backport of PR #17 to the v1.x release branch.

Co-Authored-By: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
meyfa pushed a commit that referenced this pull request Apr 16, 2024
This is a backport of PR #17 to the v2.x release branch.

Co-Authored-By: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
meyfa pushed a commit that referenced this pull request Apr 16, 2024
This is a backport of PR #17 to the v2.x release branch.

Co-Authored-By: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
meyfa pushed a commit that referenced this pull request Apr 16, 2024
This is a backport of PR #17 to the v3.x release branch.

Co-Authored-By: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
meyfa added a commit that referenced this pull request Apr 16, 2024
This is a backport of PR #17 to the v1.x release branch.

Co-authored-by: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
meyfa pushed a commit that referenced this pull request Apr 16, 2024
This is a backport of PR #17 to the v2.x release branch.

Co-authored-by: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
meyfa added a commit that referenced this pull request Apr 16, 2024
This is a backport of PR #17 to the v2.x release branch.

Co-authored-by: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
meyfa added a commit that referenced this pull request Apr 16, 2024
This is a backport of PR #17 to the v3.x release branch.

Co-authored-by: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
meyfa added a commit that referenced this pull request Apr 16, 2024
This is a backport of PR #17 to the v2.x release branch.

Co-authored-by: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
meyfa added a commit that referenced this pull request Apr 16, 2024
This is a backport of PR #17 to the v3.x release branch.

Co-authored-by: Ben Thomson <15900351+bennothommo@users.noreply.github.com>
@meyfa
Copy link
Owner

meyfa commented Apr 16, 2024

Released as v4.1.0 🎉 - and backported to v3.1.0, v2.2.0, v1.3.0.

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.

Transparent pixels with different RGB values fail on assertSimilarGD
2 participants