https://github.com/verifytests/verify.phash
Extends Verify to allow comparison of documents via Phash.
https://github.com/verifytests/verify.phash
Last synced: 8 months ago
JSON representation
Extends Verify to allow comparison of documents via Phash.
- Host: GitHub
- URL: https://github.com/verifytests/verify.phash
- Owner: VerifyTests
- License: mit
- Created: 2020-03-01T05:44:46.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-10-15T00:06:41.000Z (8 months ago)
- Last Synced: 2025-10-15T02:29:28.899Z (8 months ago)
- Language: C#
- Homepage:
- Size: 708 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- 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.Phash
[](https://github.com/orgs/VerifyTests/discussions)
[](https://ci.appveyor.com/project/SimonCropp/Verify-Phash)
[](https://www.nuget.org/packages/Verify.Phash/)
Extends [Verify](https://github.com/VerifyTests/Verify) to allow comparison of documents via [Phash](https://github.com/pgrho/phash).
**See [Milestones](../../milestones?state=closed) for release notes.**
Contains [comparers](https://github.com/VerifyTests/Verify/blob/master/docs/comparer.md) for png, jpg, bmp, and tiff.
## Sponsors
### Entity Framework Extensions
[Entity Framework Extensions](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=Verify.Phash) is a major sponsor and is proud to contribute to the development this project.
[](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=Verify.Phash)
## NuGet
* https://nuget.org/packages/Verify.Phash
## Usage
Enable:
```cs
[ModuleInitializer]
public static void Init() =>
VerifyPhash.Initialize();
```
snippet source | anchor
### Comparers
Register all comparers
```
VerifyPhash.RegisterComparer();
```
### Compare Settings
Phash comparison settings can be modified as follows:
```cs
[Test]
public Task LocalSettings() =>
VerifyFile("sample.png")
.PhashCompareSettings(
threshold: .8f,
sigma: 4f,
gamma: 2f,
angles: 170);
```
snippet source | anchor
## Icon
[Hash Brown](https://thenounproject.com/term/hash/1129857/) designed by [Icon Mark](https://thenounproject.com/iconmark) from [The Noun Project](https://thenounproject.com/).