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 BackgroundColorExtensionsMethods
| Improve this Doc 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 image this method extends. | 
| Color | color | The color to set as the background. | 
Returns
| Type | Description | 
|---|---|
| IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. | 
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 image this method extends. | 
| 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 | The IImageProcessingContext to allow chaining of operations. | 
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 image this method extends. | 
| GraphicsOptions | options | The options effecting pixel blending. | 
| Color | color | The color to set as the background. | 
Returns
| Type | Description | 
|---|---|
| IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. | 
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 image this method extends. | 
| 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 | The IImageProcessingContext to allow chaining of operations. |