Table of Contents

Class BackgroundColorExtensions

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

Defines extension methods to replace the background color of an Image using Mutate/Clone.

public static class BackgroundColorExtensions
Inheritance
BackgroundColorExtensions
Inherited Members

Methods

BackgroundColor(IImageProcessingContext, Color)

Replaces the background color of image with the given one.

public static IImageProcessingContext BackgroundColor(this IImageProcessingContext source, Color color)

Parameters

source IImageProcessingContext

The current image processing context.

color Color

The color to set as the background.

Returns

IImageProcessingContext

The IImageProcessingContext.

BackgroundColor(IImageProcessingContext, Color, Rectangle)

Replaces the background color of image with the given one.

public static IImageProcessingContext BackgroundColor(this IImageProcessingContext source, Color color, Rectangle rectangle)

Parameters

source IImageProcessingContext

The current image processing context.

color Color

The color to set as the background.

rectangle Rectangle

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

Returns

IImageProcessingContext

The IImageProcessingContext.

BackgroundColor(IImageProcessingContext, GraphicsOptions, Color)

Replaces the background color of image with the given one.

public static IImageProcessingContext BackgroundColor(this IImageProcessingContext source, GraphicsOptions options, Color color)

Parameters

source IImageProcessingContext

The current image processing context.

options GraphicsOptions

The options effecting pixel blending.

color Color

The color to set as the background.

Returns

IImageProcessingContext

The IImageProcessingContext.

BackgroundColor(IImageProcessingContext, GraphicsOptions, Color, Rectangle)

Replaces the background color of image with the given one.

public static IImageProcessingContext BackgroundColor(this IImageProcessingContext source, GraphicsOptions options, Color color, Rectangle rectangle)

Parameters

source IImageProcessingContext

The current image processing context.

options GraphicsOptions

The options effecting pixel blending.

color Color

The color to set as the background.

rectangle Rectangle

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

Returns

IImageProcessingContext

The IImageProcessingContext.