Constrain
Constrains the current image, resizing it to fit within the given dimensions whilst keeping its aspect ratio. Produces the same output as the Resize method using ResizeMode.Max
public ImageFactory Constrain(Size size)
Parameters
- size
- The
System.Drawing.Sizecontaining the maximum width and height to set the image to.
Examples
Original
Constrain