Skip to content

Extends Verify to allow comparison of documents via Phash.

License

Notifications You must be signed in to change notification settings

VerifyTests/Verify.Phash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f70c89a · Mar 25, 2025
Nov 30, 2024
Mar 25, 2025
Mar 4, 2022
Jul 24, 2020
Jul 24, 2020
Mar 26, 2024

Repository files navigation

Verify.Phash

Discussions Build status NuGet Status

Extends Verify to allow comparison of documents via Phash.

See Milestones for release notes.

Contains comparers for png, jpg, bmp, and tiff.

NuGet package

https://nuget.org/packages/Verify.Phash/

Usage

Enable:

[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:

[Test]
public Task LocalSettings() =>
    VerifyFile("sample.png")
        .PhashCompareSettings(
            threshold: .8f,
            sigma: 4f,
            gamma: 2f,
            angles: 170);

snippet source | anchor

Icon

Hash Brown designed by Icon Mark from The Noun Project.