https://github.com/verifytests/verify.imagesharp
Extends Verify to allow verification of documents via ImageSharp.
https://github.com/verifytests/verify.imagesharp
Last synced: 9 months ago
JSON representation
Extends Verify to allow verification of documents via ImageSharp.
- Host: GitHub
- URL: https://github.com/verifytests/verify.imagesharp
- Owner: VerifyTests
- License: agpl-3.0
- Created: 2020-01-11T23:17:24.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-09-05T23:33:07.000Z (10 months ago)
- Last Synced: 2025-09-06T01:18:02.250Z (10 months ago)
- Language: C#
- Homepage:
- Size: 3.13 MB
- Stars: 9
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
- License: license.txt
- Code of conduct: code_of_conduct.md
Awesome Lists containing this project
README
#
Verify.ImageSharp
[](https://github.com/orgs/VerifyTests/discussions)
[](https://ci.appveyor.com/project/SimonCropp/Verify-ImageSharp)
[](https://www.nuget.org/packages/Verify.ImageSharp/)
Extends [Verify](https://github.com/VerifyTests/Verify) to allow verification of documents via [ImageSharp](https://github.com/SixLabors/ImageSharp).
**See [Milestones](../../milestones?state=closed) for release notes.**
## Sponsors
### Entity Framework Extensions
[Entity Framework Extensions](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=Verify.ImageSharp) is a major sponsor and is proud to contribute to the development this project.
[](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=Verify.ImageSharp)
## NuGet
* https://nuget.org/packages/Verify.ImageSharp
## Usage
```cs
[ModuleInitializer]
public static void Init() =>
VerifyImageSharp.Initialize();
```
snippet source | anchor
### Verify a file
```cs
[Test]
public Task VerifyImageFile() =>
VerifyFile("sample.jpg");
```
snippet source | anchor
```cs
[Test]
public Task VerifyImageFileWithCustomEncoder() =>
VerifyFile("sample.jpg")
.EncodeAsPng();
```
snippet source | anchor
Two files are produced
#### Info file:
Samples.VerifyImageFile.verified.txt
```txt
{
Width: 1599,
Height: 1066,
HorizontalResolution: 1.0,
VerticalResolution: 1.0
}
```
snippet source | anchor
#### Image file:
Samples.VerifyImageFile.verified.jpg

### Verify an SixLabors.ImageSharp.Image
An instance if an `SixLabors.ImageSharp.Image` can be verified using the following:
```cs
[Test]
public Task VerifyImage()
{
var image = new Image(11, 11)
{
[5, 5] = Rgba32.ParseHex("#0000FF")
};
return Verify(image);
}
```
snippet source | anchor
## File Samples
http://file-examples.com/
## Icon
[Swirl](https://thenounproject.com/term/pattern/2719636/) designed by [BÖCK, RU](https://thenounproject.com/titaniclast/) from [The Noun Project](https://thenounproject.com).