Nullean.Snapshots.Images
0.12.1
dotnet add package Nullean.Snapshots.Images --version 0.12.1
NuGet\Install-Package Nullean.Snapshots.Images -Version 0.12.1
<PackageReference Include="Nullean.Snapshots.Images" Version="0.12.1" />
<PackageVersion Include="Nullean.Snapshots.Images" Version="0.12.1" />
<PackageReference Include="Nullean.Snapshots.Images" />
paket add Nullean.Snapshots.Images --version 0.12.1
#r "nuget: Nullean.Snapshots.Images, 0.12.1"
#:package Nullean.Snapshots.Images@0.12.1
#addin nuget:?package=Nullean.Snapshots.Images&version=0.12.1
#tool nuget:?package=Nullean.Snapshots.Images&version=0.12.1
Nullean.Snapshots.Images

PNG image snapshots for Nullean.Snapshots: decoded with its own PNG codec and compared pixel by pixel, perceptually and with anti-aliasing left out, so a screenshot passes on every machine. On a mismatch it writes a diff image.
Install
dotnet add package Nullean.Snapshots.Images
Quick start
This package holds the format, the PNG codec and the comparison, with no AwesomeAssertions, so the browser package and the native snap tool can compare screenshots. In tests, use Nullean.Snapshots.Images.Assertions (png.Should().MatchImageSnapshot()). Used on its own:
using System.Runtime.CompilerServices;
using Nullean.Snapshots;
using Nullean.Snapshots.Images;
public static class ImageChecks
{
// The format on its own, without AwesomeAssertions: how the browser package and snap compare screenshots.
public static void MatchPng(byte[] png, [CallerFilePath] string file = "", [CallerMemberName] string member = "", [CallerLineNumber] int line = 0)
{
var format = new ImageSnapshotFormat(new ImageSnapshotOptions { MaxDifferentRatio = 0.001, OutlineRegions = true });
var result = Snapshot.Match(png, format, new SnapshotCallSite(file, member, line));
if (!result.Passed)
throw new InvalidOperationException(result.FailureMessage); // a .received-diff.png sits next to the received image
}
}

The diff image is the verified image faded to grey, with differing pixels in red and anti-aliasing in yellow;
OutlineRegions draws a blue box around each changed region.
- Pixels, not bytes. Metadata chunks, encoders and compression levels never fail a test.
- Differences as people see them. A pixel differs when its YIQ distance exceeds
Threshold(default 0.1). - Anti-aliasing left out, unless
IncludeAntiAliasingis set.MaxDifferentPixelsandMaxDifferentRatioallow some noise.
Learn more
- Documentation: https://snapshots.nullean.net
- Image snapshots: https://snapshots.nullean.net/formats/images/
- Source and issues: https://github.com/nullean/snapshots
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Nullean.Snapshots (>= 0.12.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Nullean.Snapshots.Images:
| Package | Downloads |
|---|---|
|
Nullean.Snapshots.Browser
Browser journeys for Nullean.Snapshots: run agent-browser style journeys with Nullean.Cdp and compare their transcripts, accessibility trees and reads, as trees. |
|
|
Nullean.Snapshots.Images.Assertions
AwesomeAssertions extensions for Nullean.Snapshots.Images: MatchImageSnapshot for PNG bytes and streams. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.12.1 | 0 | 11/12/2026 |
| 0.12.0 | 0 | 11/12/2026 |
| 0.11.0 | 12 | 11/11/2026 |
| 0.10.1 | 54 | 11/11/2026 |
| 0.10.0 | 77 | 11/11/2026 |
| 0.9.0 | 46 | 11/11/2026 |
| 0.8.1 | 38 | 11/11/2026 |
| 0.8.0 | 45 | 11/11/2026 |
| 0.7.0 | 56 | 11/10/2026 |
| 0.6.0 | 86 | 11/5/2026 |
| 0.5.0 | 76 | 11/5/2026 |
| 0.4.0 | 77 | 11/5/2026 |
| 0.3.0 | 77 | 11/4/2026 |
| 0.2.0 | 89 | 11/3/2026 |