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
source
IImageProcessingContextThe current image processing context.
width
intThe new width.
height
intThe 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
source
IImageProcessingContextThe current image processing context.
width
intThe new width.
height
intThe new height.
color
ColorThe background color with which to pad the image.