Table of Contents

Method GenerateDifferenceImage

Namespace
SkiaSharp.Extended
Assembly
SkiaSharp.Extended.dll

GenerateDifferenceImage(string, string)

Generates a per-channel difference image from two images loaded from file paths. Each pixel in the result contains the absolute per-channel differences as RGB values.

public static SKImage GenerateDifferenceImage(string firstFilename, string secondFilename)

Parameters

firstFilename string

The file path of the first image.

secondFilename string

The file path of the second image.

Returns

SKImage

An SKImage where each pixel's RGB values represent the absolute per-channel differences.

GenerateDifferenceImage(SKBitmap, SKBitmap)

Generates a per-channel difference image from two bitmaps.

public static SKImage GenerateDifferenceImage(SKBitmap first, SKBitmap second)

Parameters

first SKBitmap

The first bitmap.

second SKBitmap

The second bitmap.

Returns

SKImage

An SKImage where each pixel's RGB values represent the absolute per-channel differences.

GenerateDifferenceImage(SKPixmap, SKPixmap)

Generates a per-channel difference image from two pixmaps.

public static SKImage GenerateDifferenceImage(SKPixmap first, SKPixmap second)

Parameters

first SKPixmap

The first pixmap.

second SKPixmap

The second pixmap.

Returns

SKImage

An SKImage where each pixel's RGB values represent the absolute per-channel differences.

GenerateDifferenceImage(SKImage, SKImage)

Generates a per-channel difference image from two images. Each pixel in the result contains the absolute per-channel differences as RGB values, unlike GenerateDifferenceMask(SKImage, SKImage) which produces a binary black-and-white mask.

public static SKImage GenerateDifferenceImage(SKImage first, SKImage second)

Parameters

first SKImage

The first image.

second SKImage

The second image.

Returns

SKImage

An SKImage where each pixel's RGB values represent the absolute per-channel differences.

Exceptions

ArgumentNullException

first or second is null.

InvalidOperationException

The images have different dimensions.