Table of Contents

Struct OrderedDither

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

An ordered dithering matrix with equal sides of arbitrary length

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

Constructors

OrderedDither(uint)

Initializes a new instance of the OrderedDither struct.

public OrderedDither(uint length)

Parameters

length uint

The length of the matrix sides

Fields

Bayer16x16

Applies order dithering using the 16x16 Bayer dithering matrix.

public static readonly OrderedDither Bayer16x16

Field Value

OrderedDither

Bayer2x2

Applies order dithering using the 2x2 Bayer dithering matrix.

public static readonly OrderedDither Bayer2x2

Field Value

OrderedDither

Bayer4x4

Applies order dithering using the 4x4 Bayer dithering matrix.

public static readonly OrderedDither Bayer4x4

Field Value

OrderedDither

Bayer8x8

Applies order dithering using the 8x8 Bayer dithering matrix.

public static readonly OrderedDither Bayer8x8

Field Value

OrderedDither

Ordered3x3

Applies order dithering using the 3x3 ordered dithering matrix.

public static readonly OrderedDither Ordered3x3

Field Value

OrderedDither

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(IDither?)

public bool Equals(IDither? other)

Parameters

other IDither

Returns

bool

Equals(OrderedDither)

public bool Equals(OrderedDither other)

Parameters

other OrderedDither

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Operators

operator ==(IDither, OrderedDither)

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

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

Parameters

left IDither

The first source instance.

right OrderedDither

The second source instance.

Returns

bool

The bool.

operator ==(OrderedDither, IDither)

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

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

Parameters

left OrderedDither

The first source instance.

right IDither

The second source instance.

Returns

bool

The bool.

operator ==(OrderedDither, OrderedDither)

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

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

Parameters

left OrderedDither

The first source instance.

right OrderedDither

The second source instance.

Returns

bool

The bool.

operator !=(IDither, OrderedDither)

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

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

Parameters

left IDither

The first source instance.

right OrderedDither

The second source instance.

Returns

bool

The bool.

operator !=(OrderedDither, IDither)

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

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

Parameters

left OrderedDither

The first source instance.

right IDither

The second source instance.

Returns

bool

The bool.

operator !=(OrderedDither, OrderedDither)

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

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

Parameters

left OrderedDither

The first source instance.

right OrderedDither

The second source instance.

Returns

bool

The bool.