Table of Contents

Struct ErrorDither

Namespace
SixLabors.ImageSharp.Processing.Processors.Dithering
Assembly
SixLabors.ImageSharp.dll

An error diffusion dithering implementation.

public readonly struct ErrorDither : IDither, IEquatable<ErrorDither>, IEquatable<IDither>
Implements
Inherited Members

Constructors

ErrorDither(in DenseMatrix<float>, int)

Initializes a new instance of the ErrorDither struct.

public ErrorDither(in DenseMatrix<float> matrix, int offset)

Parameters

matrix DenseMatrix<float>

The diffusion matrix.

offset int

The starting offset within the matrix.

Fields

Atkinson

Applies error diffusion based dithering using the Atkinson image dithering algorithm.

public static readonly ErrorDither Atkinson

Field Value

ErrorDither

Burkes

Applies error diffusion based dithering using the Burks image dithering algorithm.

public static readonly ErrorDither Burkes

Field Value

ErrorDither

FloydSteinberg

Applies error diffusion based dithering using the Floyd–Steinberg image dithering algorithm.

public static readonly ErrorDither FloydSteinberg

Field Value

ErrorDither

JarvisJudiceNinke

Applies error diffusion based dithering using the Jarvis, Judice, Ninke image dithering algorithm.

public static readonly ErrorDither JarvisJudiceNinke

Field Value

ErrorDither

Sierra2

Applies error diffusion based dithering using the Sierra2 image dithering algorithm.

public static readonly ErrorDither Sierra2

Field Value

ErrorDither

Sierra3

Applies error diffusion based dithering using the Sierra3 image dithering algorithm.

public static readonly ErrorDither Sierra3

Field Value

ErrorDither

SierraLite

Applies error diffusion based dithering using the Sierra Lite image dithering algorithm.

public static readonly ErrorDither SierraLite

Field Value

ErrorDither

StevensonArce

Applies error diffusion based dithering using the Stevenson-Arce image dithering algorithm.

public static readonly ErrorDither StevensonArce

Field Value

ErrorDither

Stucki

Applies error diffusion based dithering using the Stucki image dithering algorithm.

public static readonly ErrorDither Stucki

Field Value

ErrorDither

Methods

ApplyPaletteDither<TPaletteDitherImageProcessor, TPixel>(in TPaletteDitherImageProcessor, ImageFrame<TPixel>, Rectangle)

public void ApplyPaletteDither<TPaletteDitherImageProcessor, TPixel>(in TPaletteDitherImageProcessor processor, ImageFrame<TPixel> source, Rectangle bounds) where TPaletteDitherImageProcessor : struct, IPaletteDitherImageProcessor<TPixel> where TPixel : unmanaged, IPixel<TPixel>

Parameters

processor TPaletteDitherImageProcessor
source ImageFrame<TPixel>
bounds Rectangle

Type Parameters

TPaletteDitherImageProcessor
TPixel

ApplyQuantizationDither<TFrameQuantizer, TPixel>(ref TFrameQuantizer, ImageFrame<TPixel>, IndexedImageFrame<TPixel>, Rectangle)

public void ApplyQuantizationDither<TFrameQuantizer, TPixel>(ref TFrameQuantizer quantizer, ImageFrame<TPixel> source, IndexedImageFrame<TPixel> destination, Rectangle bounds) where TFrameQuantizer : struct, IQuantizer<TPixel> where TPixel : unmanaged, IPixel<TPixel>

Parameters

quantizer TFrameQuantizer
source ImageFrame<TPixel>
destination IndexedImageFrame<TPixel>
bounds Rectangle

Type Parameters

TFrameQuantizer
TPixel

Equals(ErrorDither)

public bool Equals(ErrorDither other)

Parameters

other ErrorDither

Returns

bool

Equals(IDither?)

public bool Equals(IDither? other)

Parameters

other IDither

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Operators

operator ==(ErrorDither, ErrorDither)

Compares the two ErrorDither instances to determine whether they are equal.

public static bool operator ==(ErrorDither left, ErrorDither right)

Parameters

left ErrorDither

The first source instance.

right ErrorDither

The second source instance.

Returns

bool

The bool.

operator ==(ErrorDither, IDither)

Compares the two ErrorDither instances to determine whether they are equal.

public static bool operator ==(ErrorDither left, IDither right)

Parameters

left ErrorDither

The first source instance.

right IDither

The second source instance.

Returns

bool

The bool.

operator ==(IDither, ErrorDither)

Compares the two ErrorDither instances to determine whether they are equal.

public static bool operator ==(IDither left, ErrorDither right)

Parameters

left IDither

The first source instance.

right ErrorDither

The second source instance.

Returns

bool

The bool.

operator !=(ErrorDither, ErrorDither)

Compares the two ErrorDither instances to determine whether they are unequal.

public static bool operator !=(ErrorDither left, ErrorDither right)

Parameters

left ErrorDither

The first source instance.

right ErrorDither

The second source instance.

Returns

bool

The bool.

operator !=(ErrorDither, IDither)

Compares the two ErrorDither instances to determine whether they are unequal.

public static bool operator !=(ErrorDither left, IDither right)

Parameters

left ErrorDither

The first source instance.

right IDither

The second source instance.

Returns

bool

The bool.

operator !=(IDither, ErrorDither)

Compares the two ErrorDither instances to determine whether they are unequal.

public static bool operator !=(IDither left, ErrorDither right)

Parameters

left IDither

The first source instance.

right ErrorDither

The second source instance.

Returns

bool

The bool.