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
sourceIImageProcessingContextThe current image processing context.
colorColorThe 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
sourceIImageProcessingContextThe current image processing context.
colorColorThe color to set as the background.
rectangleRectangleThe 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
sourceIImageProcessingContextThe current image processing context.
optionsGraphicsOptionsThe options effecting pixel blending.
colorColorThe 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
sourceIImageProcessingContextThe current image processing context.
optionsGraphicsOptionsThe options effecting pixel blending.
colorColorThe color to set as the background.
rectangleRectangleThe Rectangle structure that specifies the portion of the image object to alter.