Table of Contents

Class DitherExtensions

Namespace
SixLabors.ImageSharp.Processing
Assembly
SixLabors.ImageSharp.dll

Defines dithering extensions to apply on an Image using Mutate/Clone.

public static class DitherExtensions
Inheritance
DitherExtensions
Inherited Members

Methods

Dither(IImageProcessingContext)

Dithers the image reducing it to a web-safe palette using Bayer8x8.

public static IImageProcessingContext Dither(this IImageProcessingContext source)

Parameters

source IImageProcessingContext

The current image processing context.

Returns

IImageProcessingContext

The IImageProcessingContext.

Dither(IImageProcessingContext, IDither)

Dithers the image reducing it to a web-safe palette.

public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither)

Parameters

source IImageProcessingContext

The current image processing context.

dither IDither

The ordered ditherer.

Returns

IImageProcessingContext

The IImageProcessingContext.

Dither(IImageProcessingContext, IDither, Rectangle)

Dithers the image reducing it to a web-safe palette.

public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, Rectangle rectangle)

Parameters

source IImageProcessingContext

The current image processing context.

dither IDither

The ordered ditherer.

rectangle Rectangle

The Rectangle structure that specifies the portion of the image object to alter.

Returns

IImageProcessingContext

The IImageProcessingContext.

Dither(IImageProcessingContext, IDither, ReadOnlyMemory<Color>)

Dithers the image reducing it to the given palette.

public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, ReadOnlyMemory<Color> palette)

Parameters

source IImageProcessingContext

The current image processing context.

dither IDither

The ordered ditherer.

palette ReadOnlyMemory<Color>

The palette to select substitute colors from.

Returns

IImageProcessingContext

The IImageProcessingContext.

Dither(IImageProcessingContext, IDither, ReadOnlyMemory<Color>, Rectangle)

Dithers the image reducing it to the given palette.

public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, ReadOnlyMemory<Color> palette, Rectangle rectangle)

Parameters

source IImageProcessingContext

The current image processing context.

dither IDither

The ordered ditherer.

palette ReadOnlyMemory<Color>

The palette to select substitute colors from.

rectangle Rectangle

The Rectangle structure that specifies the portion of the image object to alter.

Returns

IImageProcessingContext

The IImageProcessingContext.

Dither(IImageProcessingContext, IDither, float)

Dithers the image reducing it to a web-safe palette.

public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, float ditherScale)

Parameters

source IImageProcessingContext

The current image processing context.

dither IDither

The ordered ditherer.

ditherScale float

The dithering scale used to adjust the amount of dither.

Returns

IImageProcessingContext

The IImageProcessingContext.

Dither(IImageProcessingContext, IDither, float, Rectangle)

Dithers the image reducing it to a web-safe palette.

public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, float ditherScale, Rectangle rectangle)

Parameters

source IImageProcessingContext

The current image processing context.

dither IDither

The ordered ditherer.

ditherScale float

The dithering scale used to adjust the amount of dither.

rectangle Rectangle

The Rectangle structure that specifies the portion of the image object to alter.

Returns

IImageProcessingContext

The IImageProcessingContext.

Dither(IImageProcessingContext, IDither, float, ReadOnlyMemory<Color>)

Dithers the image reducing it to the given palette.

public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, float ditherScale, ReadOnlyMemory<Color> palette)

Parameters

source IImageProcessingContext

The current image processing context.

dither IDither

The ordered ditherer.

ditherScale float

The dithering scale used to adjust the amount of dither.

palette ReadOnlyMemory<Color>

The palette to select substitute colors from.

Returns

IImageProcessingContext

The IImageProcessingContext.

Dither(IImageProcessingContext, IDither, float, ReadOnlyMemory<Color>, Rectangle)

Dithers the image reducing it to the given palette.

public static IImageProcessingContext Dither(this IImageProcessingContext source, IDither dither, float ditherScale, ReadOnlyMemory<Color> palette, Rectangle rectangle)

Parameters

source IImageProcessingContext

The current image processing context.

dither IDither

The ordered ditherer.

ditherScale float

The dithering scale used to adjust the amount of dither.

palette ReadOnlyMemory<Color>

The palette to select substitute colors from.

rectangle Rectangle

The Rectangle structure that specifies the portion of the image object to alter.

Returns

IImageProcessingContext

The IImageProcessingContext.

Dither(IImageProcessingContext, Rectangle)

Dithers the image reducing it to a web-safe palette using Bayer8x8.

public static IImageProcessingContext Dither(this IImageProcessingContext source, Rectangle rectangle)

Parameters

source IImageProcessingContext

The current image processing context.

rectangle Rectangle

The Rectangle structure that specifies the portion of the image object to alter.

Returns

IImageProcessingContext

The IImageProcessingContext.