Extends Verify to allow verification of documents via ImageSharp.
See Milestones for release notes.
https://nuget.org/packages/Verify.ImageSharp/
[ModuleInitializer]
public static void Init() =>
VerifyImageSharp.Initialize();
[Test]
public Task VerifyImageFile() =>
VerifyFile("sample.jpg");
[Test]
public Task VerifyImageFileWithCustomEncoder() =>
VerifyFile("sample.jpg")
.EncodeAsPng();
Two files are produced
Samples.VerifyImageFile.verified.txt
{
Width: 1599,
Height: 1066,
HorizontalResolution: 1.0,
VerticalResolution: 1.0
}
Samples.VerifyImageFile.verified.jpg
An instance if an SixLabors.ImageSharp.Image
can be verified using the following:
[Test]
public Task VerifyImage()
{
var image = new Image<Rgba32>(11, 11)
{
[5, 5] = Rgba32.ParseHex("#0000FF")
};
return Verify(image);
}
Swirl designed by BÖCK, RU from The Noun Project.