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
intThe 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
Burkes
Applies error diffusion based dithering using the Burks image dithering algorithm.
public static readonly ErrorDither Burkes
Field Value
FloydSteinberg
Applies error diffusion based dithering using the Floyd–Steinberg image dithering algorithm.
public static readonly ErrorDither FloydSteinberg
Field Value
JarvisJudiceNinke
Applies error diffusion based dithering using the Jarvis, Judice, Ninke image dithering algorithm.
public static readonly ErrorDither JarvisJudiceNinke
Field Value
Sierra2
Applies error diffusion based dithering using the Sierra2 image dithering algorithm.
public static readonly ErrorDither Sierra2
Field Value
Sierra3
Applies error diffusion based dithering using the Sierra3 image dithering algorithm.
public static readonly ErrorDither Sierra3
Field Value
SierraLite
Applies error diffusion based dithering using the Sierra Lite image dithering algorithm.
public static readonly ErrorDither SierraLite
Field Value
StevensonArce
Applies error diffusion based dithering using the Stevenson-Arce image dithering algorithm.
public static readonly ErrorDither StevensonArce
Field Value
Stucki
Applies error diffusion based dithering using the Stucki image dithering algorithm.
public static readonly ErrorDither Stucki
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(ErrorDither)
public bool Equals(ErrorDither other)
Parameters
other
ErrorDither
Returns
Equals(IDither?)
public bool Equals(IDither? other)
Parameters
other
IDither
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
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
ErrorDitherThe first source instance.
right
ErrorDitherThe second source instance.
Returns
operator ==(ErrorDither, IDither)
Compares the two ErrorDither instances to determine whether they are equal.
public static bool operator ==(ErrorDither left, IDither right)
Parameters
left
ErrorDitherThe first source instance.
right
IDitherThe second source instance.
Returns
operator ==(IDither, ErrorDither)
Compares the two ErrorDither instances to determine whether they are equal.
public static bool operator ==(IDither left, ErrorDither right)
Parameters
left
IDitherThe first source instance.
right
ErrorDitherThe second source instance.
Returns
operator !=(ErrorDither, ErrorDither)
Compares the two ErrorDither instances to determine whether they are unequal.
public static bool operator !=(ErrorDither left, ErrorDither right)
Parameters
left
ErrorDitherThe first source instance.
right
ErrorDitherThe second source instance.
Returns
operator !=(ErrorDither, IDither)
Compares the two ErrorDither instances to determine whether they are unequal.
public static bool operator !=(ErrorDither left, IDither right)
Parameters
left
ErrorDitherThe first source instance.
right
IDitherThe second source instance.
Returns
operator !=(IDither, ErrorDither)
Compares the two ErrorDither instances to determine whether they are unequal.
public static bool operator !=(IDither left, ErrorDither right)
Parameters
left
IDitherThe first source instance.
right
ErrorDitherThe second source instance.