Table of Contents

Class DifferenceOptions

Namespace
Egami.Analysis
Assembly
Egami.dll
public sealed record DifferenceOptions : IEquatable<DifferenceOptions>
Inheritance
DifferenceOptions
Implements
Inherited Members

Examples

// ImageMagick compare's red-over-faded picture, and the plain per-channel difference turned up 8 times.
using Raster highlight = Raster.Difference(a, b);
using Raster gaps = Raster.Difference(a, b, DifferenceStyle.Absolute, new DifferenceOptions { Amplify = 8 });
highlight.Save("highlight.png");
gaps.Save("gaps.png");

Properties

Alpha

Gets how alpha is treated. Defaults to Premultiplied.

public AlphaCompare Alpha { get; init; }

Property Value

AlphaCompare

Exceptions

ArgumentOutOfRangeException

The value is not defined.

Amplify

Gets the factor Absolute multiplies differences by, so small ones show. Defaults to 1.

public float Amplify { get; init; }

Property Value

float

Exceptions

ArgumentOutOfRangeException

The value is not finite or not positive.

Default

Gets the default options.

public static DifferenceOptions Default { get; }

Property Value

DifferenceOptions

Frame

Gets the frame compared, 0 (the default) for the first.

public int Frame { get; init; }

Property Value

int

Exceptions

ArgumentOutOfRangeException

The value is negative.

Fuzz

Gets how far a channel may differ, from 0 to 1, and still count as equal for Highlight. Defaults to 0.

public float Fuzz { get; init; }

Property Value

float

Exceptions

ArgumentOutOfRangeException

The value is outside 0 to 1.

HighlightColor

Gets the color of pixels that differ. Defaults to ImageMagick's red, #F1001E.

public Rgba8 HighlightColor { get; init; }

Property Value

Rgba8

LowlightColor

Gets the color of pixels that are equal. Defaults to white.

public Rgba8 LowlightColor { get; init; }

Property Value

Rgba8

LowlightOpacity

Gets how much of the first image shows through both colors, from 0 (none: a plain mask) to 1. Defaults to 0.2, as ImageMagick's colors at 80% opacity.

public float LowlightOpacity { get; init; }

Property Value

float

Exceptions

ArgumentOutOfRangeException

The value is outside 0 to 1.