Skip to content

Repository files navigation

Verify.ImageHash

DiscussionsBuild statusNuGet Status

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.

Entity Framework Extensions

Developed using JetBrains IDEs

JetBrains logo.

NuGet

Usage

[ModuleInitializer]publicstaticvoidInit()=>VerifyImageHash.Initialize();

snippet source | anchor

Image Comparers

The following will use ImageHash to compare the images instead of the default DifferenceHash algorithm.

[Test]publicTaskCompareImage()=>VerifyFile("sample.jpg");

snippet source | anchor

Register all comparers

All comparers can be registered:

VerifyImageHash.RegisterComparers();

Use specific threshold

[Test]publicTaskCompareImageThreshold()=>VerifyFile("sample.jpg").UseImageHash(threshold:85);

snippet source | anchor

Use specific algorithm

[Test]publicTaskCompareImageAlgorithm()=>VerifyFile("sample.jpg").UseImageHash(algorithm:newPerceptualHash());

snippet source | anchor

Icon

Swirl designed by Philipp Petzka from The Noun Project.

About

Extends Verify to allow comparison of images via ImageHash.

Resources

Code of conduct

Stars

9 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages