Class BackgroundColorExtensions
Defines extension methods to replace the background color of an Image using Mutate/Clone.
Inherited Members
Namespace: SixLabors.ImageSharp.Processing
Assembly: SixLabors.ImageSharp.dll
Syntax
public static class BackgroundColorExtensions
Methods
| Edit this page View SourceBackgroundColor(IImageProcessingContext, Color)
Replaces the background color of image with the given one.
Declaration
public static IImageProcessingContext BackgroundColor(this IImageProcessingContext source, Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| IImageProcessingContext | source | The current image processing context. |
| Color | color | The color to set as the background. |
Returns
| Type | Description |
|---|---|
| IImageProcessingContext |
BackgroundColor(IImageProcessingContext, Color, Rectangle)
Replaces the background color of image with the given one.
Declaration
public static IImageProcessingContext BackgroundColor(this IImageProcessingContext source, Color color, Rectangle rectangle)
Parameters
| Type | Name | Description |
|---|---|---|
| IImageProcessingContext | source | 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
| Type | Description |
|---|---|
| IImageProcessingContext |
BackgroundColor(IImageProcessingContext, GraphicsOptions, Color)
Replaces the background color of image with the given one.
Declaration
public static IImageProcessingContext BackgroundColor(this IImageProcessingContext source, GraphicsOptions options, Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| IImageProcessingContext | source | The current image processing context. |
| GraphicsOptions | options | The options effecting pixel blending. |
| Color | color | The color to set as the background. |
Returns
| Type | Description |
|---|---|
| IImageProcessingContext |
BackgroundColor(IImageProcessingContext, GraphicsOptions, Color, Rectangle)
Replaces the background color of image with the given one.
Declaration
public static IImageProcessingContext BackgroundColor(this IImageProcessingContext source, GraphicsOptions options, Color color, Rectangle rectangle)
Parameters
| Type | Name | Description |
|---|---|---|
| IImageProcessingContext | source | The current image processing context. |
| GraphicsOptions | options | 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
| Type | Description |
|---|---|
| IImageProcessingContext |