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

https://github.com/verifytests/verify.imagehash

Extends Verify to allow comparison of images via ImageHash.
https://github.com/verifytests/verify.imagehash

Last synced: about 1 year ago
JSON representation

Extends Verify to allow comparison of images via ImageHash.

Awesome Lists containing this project

README

          

# Verify.ImageHash

[![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/48pfe99118r80g72?svg=true)](https://ci.appveyor.com/project/SimonCropp/Verify-ImageHash)
[![NuGet Status](https://img.shields.io/nuget/v/Verify.ImageHash.svg)](https://www.nuget.org/packages/Verify.ImageHash/)

Extends [Verify](https://github.com/VerifyTests/Verify) to allow comparison of images via [ImageHash](https://github.com/coenm/ImageHash).

**See [Milestones](../../milestones?state=closed) for release notes.**

Contains [comparers](https://github.com/VerifyTests/Verify/blob/master/docs/comparer.md) for png, jpg, and bmp.

## NuGet package

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

## Usage


```cs
[ModuleInitializer]
public static void Init() =>
VerifyImageHash.Initialize();
```
snippet source | anchor

### Image Comparers

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


```cs
[Test]
public Task CompareImage() =>
VerifyFile("sample.jpg");
```
snippet source | anchor

### Register all comparers

All comparers can be registered:

```
VerifyImageHash.RegisterComparers();
```

## Icon

[Swirl](https://thenounproject.com/term/wizard/2744075/) designed by [Philipp Petzka](https://thenounproject.com/masteroficon) from [The Noun Project](https://thenounproject.com/).