An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# Verify.Phash

[![Discussions](https://img.shields.io/badge/Verify-Discussions-yellow?svg=true&label=)](https://github.com/orgs/VerifyTests/discussions)
[![Build status](https://ci.appveyor.com/api/projects/status/18lflc71pchw565r?svg=true)](https://ci.appveyor.com/project/SimonCropp/Verify-Phash)
[![NuGet Status](https://img.shields.io/nuget/v/Verify.Phash.svg)](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.

[![Entity Framework Extensions](https://raw.githubusercontent.com/VerifyTests/Verify.Phash/refs/heads/main/docs/zzz.png)](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/).