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
matrixDenseMatrix<float>The diffusion matrix.
offsetintThe 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
processorTPaletteDitherImageProcessorsourceImageFrame<TPixel>boundsRectangle
Type Parameters
TPaletteDitherImageProcessorTPixel
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
quantizerTFrameQuantizersourceImageFrame<TPixel>destinationIndexedImageFrame<TPixel>boundsRectangle
Type Parameters
TFrameQuantizerTPixel
Equals(ErrorDither)
public bool Equals(ErrorDither other)
Parameters
otherErrorDither
Returns
Equals(IDither?)
public bool Equals(IDither? other)
Parameters
otherIDither
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
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
leftErrorDitherThe first source instance.
rightErrorDitherThe 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
leftErrorDitherThe first source instance.
rightIDitherThe 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
leftIDitherThe first source instance.
rightErrorDitherThe 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
leftErrorDitherThe first source instance.
rightErrorDitherThe 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
leftErrorDitherThe first source instance.
rightIDitherThe 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
leftIDitherThe first source instance.
rightErrorDitherThe second source instance.