Class PadExtensions
- Namespace
- SixLabors.ImageSharp.Processing
- Assembly
- SixLabors.ImageSharp.dll
Defines extensions that allow the application of padding operations on an Image using Mutate/Clone.
public static class PadExtensions
- Inheritance
-
PadExtensions
- Inherited Members
Methods
Pad(IImageProcessingContext, int, int)
Evenly pads an image to fit the new dimensions.
public static IImageProcessingContext Pad(this IImageProcessingContext source, int width, int height)
Parameters
sourceIImageProcessingContextThe current image processing context.
widthintThe new width.
heightintThe new height.
Returns
Pad(IImageProcessingContext, int, int, Color)
Evenly pads an image to fit the new dimensions with the given background color.
public static IImageProcessingContext Pad(this IImageProcessingContext source, int width, int height, Color color)
Parameters
sourceIImageProcessingContextThe current image processing context.
widthintThe new width.
heightintThe new height.
colorColorThe background color with which to pad the image.