https://github.com/verifytests/verify.imagehash
Extends Verify to allow comparison of images via ImageHash.
https://github.com/verifytests/verify.imagehash
Last synced: about 1 year ago
JSON representation
Extends Verify to allow comparison of images via ImageHash.
- Host: GitHub
- URL: https://github.com/verifytests/verify.imagehash
- Owner: VerifyTests
- License: mit
- Created: 2021-12-30T01:39:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-29T22:33:06.000Z (about 2 years ago)
- Last Synced: 2024-05-01T09:37:53.719Z (about 2 years ago)
- Language: C#
- Homepage:
- Size: 834 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
- License: license.txt
- Code of conduct: code_of_conduct.md
Awesome Lists containing this project
README
#
Verify.ImageHash
[](https://github.com/orgs/VerifyTests/discussions)
[](https://ci.appveyor.com/project/SimonCropp/Verify-ImageHash)
[](https://www.nuget.org/packages/Verify.ImageHash/)
Extends [Verify](https://github.com/VerifyTests/Verify) to allow comparison of images via [ImageHash](https://github.com/coenm/ImageHash).
**See [Milestones](../../milestones?state=closed) for release notes.**
Contains [comparers](https://github.com/VerifyTests/Verify/blob/master/docs/comparer.md) for png, jpg, and bmp.
## NuGet package
https://nuget.org/packages/Verify.ImageHash/
## Usage
```cs
[ModuleInitializer]
public static void Init() =>
VerifyImageHash.Initialize();
```
snippet source | anchor
### Image Comparers
The following will use ImageHash to compare the images instead of the default DifferenceHash algorithm.
```cs
[Test]
public Task CompareImage() =>
VerifyFile("sample.jpg");
```
snippet source | anchor
### Register all comparers
All comparers can be registered:
```
VerifyImageHash.RegisterComparers();
```
## Icon
[Swirl](https://thenounproject.com/term/wizard/2744075/) designed by [Philipp Petzka](https://thenounproject.com/masteroficon) from [The Noun Project](https://thenounproject.com/).