Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
11f6819
Updated examples
stesee Dec 7, 2025
3440187
Merge pull request #84 from Codeuctivity/Documentation
stesee Dec 7, 2025
55ace17
Update README to remove Alpha-channel note
stesee Dec 8, 2025
f77c3b5
Merge pull request #85 from Codeuctivity/stesee-patch-1
stesee Dec 8, 2025
7d871b3
Bump actions/upload-artifact from 4 to 5
dependabot[bot] Dec 8, 2025
7356f6f
Bump actions/download-artifact from 4 to 6
dependabot[bot] Dec 8, 2025
744e557
Merge pull request #87 from Codeuctivity/dependabot/github_actions/ac…
stesee Dec 9, 2025
cec5649
Merge pull request #86 from Codeuctivity/dependabot/github_actions/ac…
stesee Dec 9, 2025
2760187
Bump actions/upload-artifact from 5 to 6
dependabot[bot] Dec 15, 2025
d3eca81
Bump actions/download-artifact from 6 to 7
dependabot[bot] Dec 15, 2025
b03b4be
Initial plan
Copilot Jan 6, 2026
b1b550d
Fix GitHub Actions token references and add permissions
Copilot Jan 6, 2026
bc915dc
Merge pull request #90 from Codeuctivity/copilot/fix-github-actions-t…
stesee Jan 6, 2026
98feebb
Merge pull request #89 from Codeuctivity/dependabot/github_actions/ac…
stesee Jan 6, 2026
f189acb
Merge pull request #88 from Codeuctivity/dependabot/github_actions/ac…
stesee Jan 6, 2026
9ba0553
Bump SkiaSharp from 3.119.1 to 3.119.2
dependabot[bot] Feb 9, 2026
63b71d3
Merge pull request #91 from Codeuctivity/dependabot/nuget/SkiaSharpCo…
stesee Feb 24, 2026
1e04ca3
Bump SkiaSharp.NativeAssets.Linux.NoDependencies from 3.119.1 to 3.119.2
dependabot[bot] Feb 24, 2026
20dcb4c
Merge pull request #92 from Codeuctivity/dependabot/nuget/SkiaSharpCo…
stesee Feb 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
path-to-document: 'https://github.com/Codeuctivity/SkiaSharp.Compare/blob/main/cla.md' # e.g. a CLA or a DCO document
# branch should not be protected
branch: 'cla'
allowlist: dependabot[bot],stesee,github-actions[bot],github-copilot[bot],copilot[bot]
allowlist: dependabot[bot],stesee,github-actions[bot],github-copilot[bot],copilot[bot],copilot-swe-agent[bot]

#below are the optional inputs - If the optional inputs are not given, then default values will be taken
#remote-organization-name: enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository)
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ env:

on:
push:
paths-ignore:
- '**.md'

permissions:
contents: write

jobs:
build:
Expand Down Expand Up @@ -46,7 +51,7 @@ jobs:
dotnet publish SkiaSharpCompare.Cli/SkiaSharpCompare.Cli.csproj -c Release -r win-arm64 --self-contained true -p:PublishSingleFile=true -o ./artifacts/cli/win-arm64

- name: Upload CLI artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: cli-artifacts-${{ matrix.os }}
path: ./artifacts/cli
Expand All @@ -72,7 +77,7 @@ jobs:
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Download CLI artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
path: ./artifacts_download
- name: NugetPush
Expand All @@ -84,7 +89,7 @@ jobs:
- name: Github release
shell: bash
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: env.GITHUB_TOKEN != ''
run: |
# Attach all downloaded CLI artifacts regardless of OS
Expand All @@ -109,7 +114,7 @@ jobs:
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Download CLI artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
path: ./artifacts_download
- name: NugetPush
Expand All @@ -122,7 +127,7 @@ jobs:
- name: Github prerelease
shell: bash
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: env.GITHUB_TOKEN != ''
run: |
zip -r cli-artifacts.zip ./artifacts_download
Expand Down
38 changes: 31 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Inspired by the image compare feature "Visual verification API" of [TestApi](htt

SkiaSharpCompare focus on os agnostic support and therefore depends on [SkiaSharp](https://github.com/mono/SkiaSharp).

NOTE: The Alpha-channel is ignored.

## Example simple show cases

### Compares each RGB value of each pixel to determine the equality
Expand All @@ -18,14 +16,14 @@ NOTE: The Alpha-channel is ignored.
bool isEqual = Compare.ImagesAreEqual("actual.png", "expected.png");
```

### Calculates diff
### [Calculates diff](https://dotnetfiddle.net/tTnq2j)

```csharp
var calcDiff = Compare.CalcDiff("2x2PixelBlack.png", "2x2PixelWhite.png");
Console.WriteLine($"PixelErrorCount: {diff.PixelErrorCount}");
Console.WriteLine($"PixelErrorPercentage: {diff.PixelErrorPercentage}");
Console.WriteLine($"AbsoluteError: {diff.AbsoluteError}");
Console.WriteLine($"MeanError: {diff.MeanError}");
Console.WriteLine($"PixelErrorCount: {calcDiff.PixelErrorCount}");
Console.WriteLine($"PixelErrorPercentage: {calcDiff.PixelErrorPercentage}");
Console.WriteLine($"AbsoluteError: {calcDiff.AbsoluteError}");
Console.WriteLine($"MeanError: {calcDiff.MeanError}");
// PixelErrorCount: 4
// PixelErrorPercentage: 100
// AbsoluteError: 3060
Expand Down Expand Up @@ -65,3 +63,29 @@ Example - Compare two images using the created difference image. Add white pixel
var maskedDiff = SkiaSharpCompare.CalcDiff(pathPic1, pathPic2, "differenceMask.png");
Assert.That(maskedDiff.AbsoluteError, Is.EqualTo(0));
```

### [Configure transparency, enable metadata compare, ...](https://dotnetfiddle.net/lygaRU)

```csharp
var comparer = new ImageCompare(ResizeOption.Resize, TransparencyOptions.CompareAlphaChannel, pixelColorShiftTolerance: 5, compareMetadata: true);
var calcDiff = comparer.CalcDiff("pngPartialTransparent4x4Pixel.png", "2x2PixelWhite.png");
// Displaying the differences
Console.WriteLine($"PixelErrorCount: {calcDiff.PixelErrorCount}");
Console.WriteLine($"PixelErrorPercentage: {calcDiff.PixelErrorPercentage}");
Console.WriteLine($"AbsoluteError: {calcDiff.AbsoluteError}");
Console.WriteLine($"MeanError: {calcDiff.MeanError}");
foreach (var metadataDifference in calcDiff.MetadataDifferences)
Console.WriteLine($"Metadata Difference: {metadataDifference}");

// PixelErrorCount: 16
// PixelErrorPercentage: 100
// AbsoluteError: 14272
// MeanError: 892
// Metadata Difference: [File:File Name, (pngPartialTransparent4x4Pixel.png, 2x2PixelWhite.png)]
// Metadata Difference: [File:File Size, (688 bytes, 556 bytes)]
// Metadata Difference: [PNG-IHDR:Color Type, (True Color with Alpha, True Color)]
// Metadata Difference: [PNG-IHDR:Image Height, (4, 2)]
// Metadata Difference: [PNG-IHDR:Image Width, (4, 2)]
// Metadata Difference: [PNG-tEXt:Textual Data, (Software: Paint.NET 5.1.2, Comment: Created with GIMP)]
// ...
```
4 changes: 2 additions & 2 deletions SkiaSharpCompare/SkiaSharpCompare.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@

<ItemGroup>
<PackageReference Include="MetadataExtractor" Version="2.9.0" />
<PackageReference Include="SkiaSharp" Version="3.119.1" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="3.119.1" />
<PackageReference Include="SkiaSharp" Version="3.119.2" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="3.119.2" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.16.0.128591">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
37 changes: 29 additions & 8 deletions SkiaSharpCompare/docs/nugetReadme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,42 @@
bool isEqual = Compare.ImagesAreEqual("actual.png", "expected.png");
```

## Calculates diff
## [Calculates diff](https://dotnetfiddle.net/tTnq2j)

```csharp
var calcDiff = Compare.CalcDiff("2x2PixelBlack.png", "2x2PixelWhite.png");
Console.WriteLine($"PixelErrorCount: {diff.PixelErrorCount}");
Console.WriteLine($"PixelErrorPercentage: {diff.PixelErrorPercentage}");
Console.WriteLine($"AbsoluteError: {diff.AbsoluteError}");
Console.WriteLine($"MeanError: {diff.MeanError}");
Console.WriteLine($"PixelErrorCount: {calcDiff.PixelErrorCount}");
Console.WriteLine($"PixelErrorPercentage: {calcDiff.PixelErrorPercentage}");
Console.WriteLine($"AbsoluteError: {calcDiff.AbsoluteError}");
Console.WriteLine($"MeanError: {calcDiff.MeanError}");
// PixelErrorCount: 4
// PixelErrorPercentage: 100
// AbsoluteError: 3060
// MeanError: 765
```

## Further features
## [Configure transparency, enable metadata compare, ...](https://dotnetfiddle.net/lygaRU)

- Diff mask: allowing defined areas to diff from the compared image.
- Compare images that have different dimension
```csharp
var comparer = new ImageCompare(ResizeOption.Resize, TransparencyOptions.CompareAlphaChannel, pixelColorShiftTolerance: 5, compareMetadata: true);
var calcDiff = comparer.CalcDiff("pngPartialTransparent4x4Pixel.png", "2x2PixelWhite.png");
// Displaying the differences
Console.WriteLine($"PixelErrorCount: {calcDiff.PixelErrorCount}");
Console.WriteLine($"PixelErrorPercentage: {calcDiff.PixelErrorPercentage}");
Console.WriteLine($"AbsoluteError: {calcDiff.AbsoluteError}");
Console.WriteLine($"MeanError: {calcDiff.MeanError}");
foreach (var metadataDifference in calcDiff.MetadataDifferences)
Console.WriteLine($"Metadata Difference: {metadataDifference}");

// PixelErrorCount: 16
// PixelErrorPercentage: 100
// AbsoluteError: 14272
// MeanError: 892
// Metadata Difference: [File:File Name, (pngPartialTransparent4x4Pixel.png, 2x2PixelWhite.png)]
// Metadata Difference: [File:File Size, (688 bytes, 556 bytes)]
// Metadata Difference: [PNG-IHDR:Color Type, (True Color with Alpha, True Color)]
// Metadata Difference: [PNG-IHDR:Image Height, (4, 2)]
// Metadata Difference: [PNG-IHDR:Image Width, (4, 2)]
// Metadata Difference: [PNG-tEXt:Textual Data, (Software: Paint.NET 5.1.2, Comment: Created with GIMP)]
// ...
```
30 changes: 15 additions & 15 deletions SkiaSharpCompareTestNunit/SkiaSharpCompareTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void ShouldVerifyThatImageStreamsSizeAreEqual(string pathActual, string p
[TestCase(TestFiles.png0Rgba32, TestFiles.png0Rgba32, ResizeOption.Resize, TransparencyOptions.CompareAlphaChannel)]
[TestCase(TestFiles.jpg0Rgb24, TestFiles.jpg0Rgb24, ResizeOption.DontResize, TransparencyOptions.IgnoreAlphaChannel)]
[TestCase(TestFiles.png0Rgba32, TestFiles.png0Rgba32, ResizeOption.DontResize, TransparencyOptions.IgnoreAlphaChannel)]
[TestCase(TestFiles.pngTransparent2x2px, TestFiles.pngPartialTransparent2x2px, ResizeOption.DontResize, TransparencyOptions.IgnoreAlphaChannel)]
[TestCase(TestFiles.pngTransparent4x4px, TestFiles.pngPartialTransparent4x4px, ResizeOption.DontResize, TransparencyOptions.IgnoreAlphaChannel)]
public void ShouldVerifyThatImagesAreEqual(string pathActual, string pathExpected, ResizeOption resizeOption, TransparencyOptions transparencyOptions)
{
var sut = new ImageCompare(resizeOption, transparencyOptions);
Expand Down Expand Up @@ -131,8 +131,8 @@ public void ShouldVerifyThatSkiaSharpImagesAreEqual(string pathActual, string pa
[TestCase(TestFiles.renderedForm2, TestFiles.renderedForm1, 49267623, 60.794204096742348d, 174178, 21.49284304047384d, ResizeOption.Resize, 0, TransparencyOptions.CompareAlphaChannel)]
[TestCase(TestFiles.colorShift1, TestFiles.colorShift2, 117896, 3.437201166180758d, 30398, 88.623906705539355d, ResizeOption.DontResize, 0, TransparencyOptions.CompareAlphaChannel)]
[TestCase(TestFiles.colorShift1, TestFiles.colorShift2, 0, 0, 0, 0, ResizeOption.DontResize, 15, TransparencyOptions.CompareAlphaChannel)]
[TestCase(TestFiles.pngPartialTransparent2x2px, TestFiles.pngTransparent2x2px, 2048, 128.0d, 16, 100, ResizeOption.DontResize, 0, TransparencyOptions.CompareAlphaChannel)]
[TestCase(TestFiles.pngPartialTransparent2x2px, TestFiles.pngTransparent2x2px, 0, 0, 0, 0, ResizeOption.DontResize, 0, TransparencyOptions.IgnoreAlphaChannel)]
[TestCase(TestFiles.pngPartialTransparent4x4px, TestFiles.pngTransparent4x4px, 2048, 128.0d, 16, 100, ResizeOption.DontResize, 0, TransparencyOptions.CompareAlphaChannel)]
[TestCase(TestFiles.pngPartialTransparent4x4px, TestFiles.pngTransparent4x4px, 0, 0, 0, 0, ResizeOption.DontResize, 0, TransparencyOptions.IgnoreAlphaChannel)]
public void ShouldVerifyThatImagesAreSemiEqual(string pathPic1, string pathPic2, int expectedAbsoluteError, double expectedMeanError, int expectedPixelErrorCount, double expectedPixelErrorPercentage, ResizeOption resizeOption, int colorShiftTolerance, TransparencyOptions transparencyOptions)
{
var sut = new ImageCompare(resizeOption, transparencyOptions, colorShiftTolerance);
Expand Down Expand Up @@ -212,7 +212,7 @@ public void ShouldCalcDiffMaskSKBitmap(string pathPic1, string pathPic2, int exp

[TestCase(TestFiles.png0Rgba32, TestFiles.png1Rgba32, null, TransparencyOptions.IgnoreAlphaChannel)]
[TestCase(TestFiles.pngWhite2x2px, TestFiles.pngBlack2x2px, ResizeOption.Resize, TransparencyOptions.CompareAlphaChannel)]
[TestCase(TestFiles.pngTransparent2x2px, TestFiles.pngPartialTransparent2x2px, ResizeOption.Resize, TransparencyOptions.CompareAlphaChannel)]
[TestCase(TestFiles.pngTransparent4x4px, TestFiles.pngPartialTransparent4x4px, ResizeOption.Resize, TransparencyOptions.CompareAlphaChannel)]
[TestCase(TestFiles.png0Rgba32, TestFiles.png1Rgba32, ResizeOption.DontResize, TransparencyOptions.IgnoreAlphaChannel)]
[TestCase(TestFiles.png0Rgba32, TestFiles.png1Rgba32, ResizeOption.Resize, TransparencyOptions.IgnoreAlphaChannel)]
[TestCase(TestFiles.pngWhite2x2px, TestFiles.pngBlack4x4px, ResizeOption.Resize, TransparencyOptions.IgnoreAlphaChannel)]
Expand Down Expand Up @@ -259,15 +259,15 @@ private static void SaveAsPng(SKBitmap maskImage, FileStream fileStreamDifferenc
[TestCase(TestFiles.jpg0Rgb24, TestFiles.jpg1Rgb24, 0, 0, 0, 0, ResizeOption.Resize, TransparencyOptions.CompareAlphaChannel)]
[TestCase(TestFiles.pngBlack2x2px, TestFiles.pngBlack4x4px, 0, 0, 0, 0, ResizeOption.Resize, TransparencyOptions.CompareAlphaChannel)]
[TestCase(TestFiles.pngBlack2x2px, TestFiles.pngWhite2x2px, 0, 0, 0, 0, ResizeOption.Resize, TransparencyOptions.CompareAlphaChannel)]
[TestCase(TestFiles.pngTransparent2x2px, TestFiles.pngWhite2x2px, 0, 0, 0, 0, ResizeOption.Resize, TransparencyOptions.CompareAlphaChannel)]
[TestCase(TestFiles.pngTransparent2x2px, TestFiles.pngBlack4x4px, 0, 0, 0, 0, ResizeOption.Resize, TransparencyOptions.CompareAlphaChannel)]
[TestCase(TestFiles.pngTransparent4x4px, TestFiles.pngWhite2x2px, 0, 0, 0, 0, ResizeOption.Resize, TransparencyOptions.CompareAlphaChannel)]
[TestCase(TestFiles.pngTransparent4x4px, TestFiles.pngBlack4x4px, 0, 0, 0, 0, ResizeOption.Resize, TransparencyOptions.CompareAlphaChannel)]
[TestCase(TestFiles.png0Rgba32, TestFiles.png1Rgba32, 0, 0, 0, 0, ResizeOption.DontResize, TransparencyOptions.IgnoreAlphaChannel)]
[TestCase(TestFiles.jpg0Rgb24, TestFiles.jpg1Rgb24, 0, 0, 0, 0, ResizeOption.DontResize, TransparencyOptions.IgnoreAlphaChannel)]
[TestCase(TestFiles.jpg0Rgb24, TestFiles.jpg1Rgb24, 0, 0, 0, 0, ResizeOption.Resize, TransparencyOptions.IgnoreAlphaChannel)]
[TestCase(TestFiles.pngBlack2x2px, TestFiles.pngBlack4x4px, 0, 0, 0, 0, ResizeOption.Resize, TransparencyOptions.IgnoreAlphaChannel)]
[TestCase(TestFiles.pngBlack2x2px, TestFiles.pngWhite2x2px, 0, 0, 0, 0, ResizeOption.Resize, TransparencyOptions.IgnoreAlphaChannel)]
[TestCase(TestFiles.pngTransparent2x2px, TestFiles.pngWhite2x2px, 0, 0, 0, 0, ResizeOption.Resize, TransparencyOptions.IgnoreAlphaChannel)]
[TestCase(TestFiles.pngTransparent2x2px, TestFiles.pngBlack4x4px, 0, 0, 0, 0, ResizeOption.Resize, TransparencyOptions.IgnoreAlphaChannel)]
[TestCase(TestFiles.pngTransparent4x4px, TestFiles.pngWhite2x2px, 0, 0, 0, 0, ResizeOption.Resize, TransparencyOptions.IgnoreAlphaChannel)]
[TestCase(TestFiles.pngTransparent4x4px, TestFiles.pngBlack4x4px, 0, 0, 0, 0, ResizeOption.Resize, TransparencyOptions.IgnoreAlphaChannel)]
public void ShouldCalcDiffMaskSKBitmapAndUseOutcome(string pathPic1, string pathPic2, int expectedMeanError, int expectedAbsoluteError, int expectedPixelErrorCount, double expectedPixelErrorPercentage, ResizeOption resizeOption, TransparencyOptions transparencyOptions)
{
var sut = new ImageCompare(resizeOption, transparencyOptions);
Expand All @@ -294,7 +294,7 @@ public void ShouldCalcDiffMaskSKBitmapAndUseOutcome(string pathPic1, string path
Assert.That(maskedDiff.PixelErrorPercentage, Is.EqualTo(expectedPixelErrorPercentage), "PixelErrorPercentage");
}

[TestCase(TestFiles.pngWhite2x2px, TestFiles.pngBlack2x2px, TestFiles.pngTransparent2x2px, 765, 12240, 16, 100d, ResizeOption.Resize, 0)]
[TestCase(TestFiles.pngWhite2x2px, TestFiles.pngBlack2x2px, TestFiles.pngTransparent4x4px, 765, 12240, 16, 100d, ResizeOption.Resize, 0)]
[TestCase(TestFiles.pngWhite2x2px, TestFiles.pngBlack2x2px, TestFiles.pngBlack4x4px, 765, 12240, 16, 100d, ResizeOption.Resize, 0)]
[TestCase(TestFiles.pngBlack2x2px, TestFiles.pngBlack2x2px, TestFiles.pngBlack4x4px, 0, 0, 0, 0, ResizeOption.Resize, 0)]
[TestCase(TestFiles.pngBlack2x2px, TestFiles.pngBlack4x4px, TestFiles.pngBlack2x2px, 0, 0, 0, 0, ResizeOption.Resize, 0)]
Expand Down Expand Up @@ -363,8 +363,8 @@ public void CalcDiffStreams(string pathPic1, string pathPic2, int expectedMeanEr
[TestCase(TestFiles.colorShift1, TestFiles.colorShift2, TransparencyOptions.CompareAlphaChannel, 20)]
[TestCase(TestFiles.png0Rgba32, TestFiles.png1Rgba32, TransparencyOptions.IgnoreAlphaChannel, 0)]
[TestCase(TestFiles.colorShift1, TestFiles.colorShift2, TransparencyOptions.IgnoreAlphaChannel, 20)]
[TestCase(TestFiles.pngTransparent2x2px, TestFiles.pngPartialTransparent2x2px, TransparencyOptions.IgnoreAlphaChannel, 0)]
[TestCase(TestFiles.pngTransparent2x2px, TestFiles.pngPartialTransparent2x2px, TransparencyOptions.CompareAlphaChannel, 0)]
[TestCase(TestFiles.pngTransparent4x4px, TestFiles.pngPartialTransparent4x4px, TransparencyOptions.IgnoreAlphaChannel, 0)]
[TestCase(TestFiles.pngTransparent4x4px, TestFiles.pngPartialTransparent4x4px, TransparencyOptions.CompareAlphaChannel, 0)]
public void CalcDiffMaskImage_WhenSupplyingDiffMaskOfTwoImagesByFilePath_NoDifferences(string image1RelativePath, string image2RelativePath, TransparencyOptions transparencyOptions, int colorShiftTolerance)
{
var sut = new ImageCompare(ResizeOption.DontResize, transparencyOptions, colorShiftTolerance);
Expand Down Expand Up @@ -443,7 +443,7 @@ public void CalcDiffMaskImage_WhenSupplyingDiffMaskOfTwoImagesByImage_NoDifferen
[TestCase(TestFiles.jpg0Rgb24, TestFiles.png0Rgba32)]
[TestCase(TestFiles.jpg1Rgb24, TestFiles.png1Rgba32)]
[TestCase(TestFiles.colorShift1, TestFiles.colorShift2)]
[TestCase(TestFiles.pngTransparent2x2px, TestFiles.pngPartialTransparent2x2px)]
[TestCase(TestFiles.pngTransparent4x4px, TestFiles.pngPartialTransparent4x4px)]
public void ShouldVerifyThatImagesAreNotEqual(string pathActual, string pathExpected)
{
var sut = new ImageCompare();
Expand All @@ -460,7 +460,7 @@ public void ShouldVerifyThatImagesAreNotEqual(string pathActual, string pathExpe
[TestCase(TestFiles.jpg0Rgb24, TestFiles.png0Rgba32)]
[TestCase(TestFiles.jpg1Rgb24, TestFiles.png1Rgba32)]
[TestCase(TestFiles.colorShift1, TestFiles.colorShift2)]
[TestCase(TestFiles.pngTransparent2x2px, TestFiles.pngPartialTransparent2x2px)]
[TestCase(TestFiles.pngTransparent4x4px, TestFiles.pngPartialTransparent4x4px)]
public void ShouldVerifyThatImageStreamAreNotEqual(string pathActual, string pathExpected)
{
var sut = new ImageCompare();
Expand Down Expand Up @@ -489,8 +489,8 @@ public void ShouldVerifyThatImageWithDifferentSizeThrows(string pathPic1, string
[TestCase(TestFiles.png0Rgba32, TestFiles.png0Rgba32, TestFiles.pngBlack2x2px)]
[TestCase(TestFiles.png0Rgba32, TestFiles.pngBlack2x2px, TestFiles.png0Rgba32)]
[TestCase(TestFiles.pngBlack2x2px, TestFiles.png0Rgba32, TestFiles.png0Rgba32)]
[TestCase(TestFiles.pngPartialTransparent2x2px, TestFiles.png0Rgba32, TestFiles.png0Rgba32)]
[TestCase(TestFiles.png0Rgba32, TestFiles.png0Rgba32, TestFiles.pngPartialTransparent2x2px)]
[TestCase(TestFiles.pngPartialTransparent4x4px, TestFiles.png0Rgba32, TestFiles.png0Rgba32)]
[TestCase(TestFiles.png0Rgba32, TestFiles.png0Rgba32, TestFiles.pngPartialTransparent4x4px)]
public void ShouldVerifyThatImageWithDifferentSizeThrows(string pathPic1, string pathPic2, string pathPic3)
{
var sut = new ImageCompare();
Expand Down
2 changes: 1 addition & 1 deletion SkiaSharpCompareTestNunit/SkiaSharpStaticCompareTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public void ShouldCalcDiffMaskSKBitmapAndUseOutcome(string pathPic1, string path
Assert.That(maskedDiff.PixelErrorPercentage, Is.EqualTo(expectedPixelErrorPercentage), "PixelErrorPercentage");
}

[TestCase(TestFiles.pngWhite2x2px, TestFiles.pngBlack2x2px, TestFiles.pngTransparent2x2px, 765, 12240, 16, 100d, ResizeOption.Resize, 0)]
[TestCase(TestFiles.pngWhite2x2px, TestFiles.pngBlack2x2px, TestFiles.pngTransparent4x4px, 765, 12240, 16, 100d, ResizeOption.Resize, 0)]
[TestCase(TestFiles.pngWhite2x2px, TestFiles.pngBlack2x2px, TestFiles.pngBlack4x4px, 765, 12240, 16, 100d, ResizeOption.Resize, 0)]
[TestCase(TestFiles.pngBlack2x2px, TestFiles.pngBlack2x2px, TestFiles.pngBlack4x4px, 0, 0, 0, 0, ResizeOption.Resize, 0)]
[TestCase(TestFiles.pngBlack2x2px, TestFiles.pngBlack4x4px, TestFiles.pngBlack2x2px, 0, 0, 0, 0, ResizeOption.Resize, 0)]
Expand Down
Loading
Loading