Interface IDither
Defines the contract for types that apply dithering to images.
Namespace: SixLabors.ImageSharp.Processing.Processors.Dithering
Assembly: SixLabors.ImageSharp.dll
Syntax
public interface IDither
Methods
| Edit this page View SourceApplyPaletteDither<TPaletteDitherImageProcessor, TPixel>(in TPaletteDitherImageProcessor, ImageFrame<TPixel>, Rectangle)
Transforms the image frame applying a dither matrix. This method should be treated as destructive, altering the input pixels.
Declaration
void ApplyPaletteDither<TPaletteDitherImageProcessor, TPixel>(in TPaletteDitherImageProcessor processor, ImageFrame<TPixel> source, Rectangle bounds) where TPaletteDitherImageProcessor : struct, IPaletteDitherImageProcessor<TPixel> where TPixel : unmanaged, IPixel<TPixel>
Parameters
Type | Name | Description |
---|---|---|
TPaletteDitherImageProcessor | processor | The palette dithering processor. |
ImageFrame<TPixel> | source | The source image. |
Rectangle | bounds | The region of interest bounds. |
Type Parameters
Name | Description |
---|---|
TPaletteDitherImageProcessor | The type of palette dithering processor. |
TPixel | The pixel format. |
ApplyQuantizationDither<TFrameQuantizer, TPixel>(ref TFrameQuantizer, ImageFrame<TPixel>, IndexedImageFrame<TPixel>, Rectangle)
Transforms the quantized image frame applying a dither matrix. This method should be treated as destructive, altering the input pixels.
Declaration
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
Type | Name | Description |
---|---|---|
TFrameQuantizer | quantizer | The frame quantizer. |
ImageFrame<TPixel> | source | The source image. |
IndexedImageFrame<TPixel> | destination | The destination quantized frame. |
Rectangle | bounds | The region of interest bounds. |
Type Parameters
Name | Description |
---|---|
TFrameQuantizer | The type of frame quantizer. |
TPixel | The pixel format. |