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

https://github.com/verifytests/verify.imagesharp.compare

Extends Verify to allow comparison of images via ImageSharp.Compare.
https://github.com/verifytests/verify.imagesharp.compare

Last synced: about 1 year ago
JSON representation

Extends Verify to allow comparison of images via ImageSharp.Compare.

Awesome Lists containing this project

README

          

# Verify.ImageSharp.Compare

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

Extends [Verify](https://github.com/VerifyTests/Verify) to allow comparison of images via [Codeuctivity.ImageSharp.Compare](https://github.com/Codeuctivity/ImageSharp.Compare).

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

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

## NuGet package

https://nuget.org/packages/Verify.ImageSharp.Compare/

## Usage


```cs
[ModuleInitializer]
public static void Init() =>
VerifyImageSharpCompare.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:

```
VerifyImageSharpCompare.RegisterComparers();
```

## Icon

[Pattern](https://thenounproject.com/term/pattern/891931/) designed by [Marialuisa Iborra](https://thenounproject.com/marialuisa.iborra/) from [The Noun Project](https://thenounproject.com/).