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
IImageProcessingContextThe current image processing context.
color
ColorThe color to set as the background.
Returns
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
IImageProcessingContextThe current image processing context.
color
ColorThe color to set as the background.
rectangle
RectangleThe Rectangle structure that specifies the portion of the image object to alter.
Returns
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
IImageProcessingContextThe current image processing context.
options
GraphicsOptionsThe options effecting pixel blending.
color
ColorThe color to set as the background.
Returns
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
IImageProcessingContextThe current image processing context.
options
GraphicsOptionsThe options effecting pixel blending.
color
ColorThe color to set as the background.
rectangle
RectangleThe Rectangle structure that specifies the portion of the image object to alter.