Verify.ImageHash
April 9, 2026 ยท View on GitHub
Extends Verify to allow comparison of images via ImageHash.
See Milestones for release notes.
Contains comparers for png, jpg, and bmp.
Sponsors
Entity Framework Extensions
Entity Framework Extensions is a major sponsor and is proud to contribute to the development this project.
Developed using JetBrains IDEs
NuGet
Usage
[ModuleInitializer]
public static void Init() =>
VerifyImageHash.Initialize();
Image Comparers
The following will use ImageHash to compare the images instead of the default DifferenceHash algorithm.
[Test]
public Task CompareImage() =>
VerifyFile("sample.jpg");
Register all comparers
All comparers can be registered:
VerifyImageHash.RegisterComparers();
Use specific threshold
[Test]
public Task CompareImageThreshold() =>
VerifyFile("sample.jpg")
.UseImageHash(threshold: 85);
Use specific algorithm
[Test]
public Task CompareImageAlgorithm() =>
VerifyFile("sample.jpg")
.UseImageHash(algorithm: new PerceptualHash());
Icon
Swirl designed by Philipp Petzka from The Noun Project.

