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
uintThe length of the matrix sides
Fields
Bayer16x16
Applies order dithering using the 16x16 Bayer dithering matrix.
public static readonly OrderedDither Bayer16x16
Field Value
Bayer2x2
Applies order dithering using the 2x2 Bayer dithering matrix.
public static readonly OrderedDither Bayer2x2
Field Value
Bayer4x4
Applies order dithering using the 4x4 Bayer dithering matrix.
public static readonly OrderedDither Bayer4x4
Field Value
Bayer8x8
Applies order dithering using the 8x8 Bayer dithering matrix.
public static readonly OrderedDither Bayer8x8
Field Value
Ordered3x3
Applies order dithering using the 3x3 ordered dithering matrix.
public static readonly OrderedDither Ordered3x3
Field Value
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
TPaletteDitherImageProcessorsource
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
TFrameQuantizersource
ImageFrame<TPixel>destination
IndexedImageFrame<TPixel>bounds
Rectangle
Type Parameters
TFrameQuantizer
TPixel
Equals(IDither?)
public bool Equals(IDither? other)
Parameters
other
IDither
Returns
Equals(OrderedDither)
public bool Equals(OrderedDither other)
Parameters
other
OrderedDither
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
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
IDitherThe first source instance.
right
OrderedDitherThe second source instance.
Returns
operator ==(OrderedDither, IDither)
Compares the two OrderedDither instances to determine whether they are equal.
public static bool operator ==(OrderedDither left, IDither right)
Parameters
left
OrderedDitherThe first source instance.
right
IDitherThe second source instance.
Returns
operator ==(OrderedDither, OrderedDither)
Compares the two OrderedDither instances to determine whether they are equal.
public static bool operator ==(OrderedDither left, OrderedDither right)
Parameters
left
OrderedDitherThe first source instance.
right
OrderedDitherThe second source instance.
Returns
operator !=(IDither, OrderedDither)
Compares the two OrderedDither instances to determine whether they are unequal.
public static bool operator !=(IDither left, OrderedDither right)
Parameters
left
IDitherThe first source instance.
right
OrderedDitherThe second source instance.
Returns
operator !=(OrderedDither, IDither)
Compares the two OrderedDither instances to determine whether they are unequal.
public static bool operator !=(OrderedDither left, IDither right)
Parameters
left
OrderedDitherThe first source instance.
right
IDitherThe second source instance.
Returns
operator !=(OrderedDither, OrderedDither)
Compares the two OrderedDither instances to determine whether they are unequal.
public static bool operator !=(OrderedDither left, OrderedDither right)
Parameters
left
OrderedDitherThe first source instance.
right
OrderedDitherThe second source instance.