Table of Contents

Interface IDither

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

Defines the contract for types that apply dithering to images.

public interface IDither

Methods

ApplyPaletteDither<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.

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

The palette dithering processor.

source ImageFrame<TPixel>

The source image.

bounds Rectangle

The region of interest bounds.

Type Parameters

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.

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

The frame quantizer.

source ImageFrame<TPixel>

The source image.

destination IndexedImageFrame<TPixel>

The destination quantized frame.

bounds Rectangle

The region of interest bounds.

Type Parameters

TFrameQuantizer

The type of frame quantizer.

TPixel

The pixel format.