Share via


WebImage.Resize(Int32, Int32, Boolean, Boolean) Method

Definition

Resizes an image.

public System.Web.Helpers.WebImage Resize (int width, int height, bool preserveAspectRatio = true, bool preventEnlarge = false);
member this.Resize : int * int * bool * bool -> System.Web.Helpers.WebImage
Public Function Resize (width As Integer, height As Integer, Optional preserveAspectRatio As Boolean = true, Optional preventEnlarge As Boolean = false) As WebImage

Parameters

width
Int32

The width, in pixels, of the WebImage object.

height
Int32

The height, in pixels, of the WebImage object.

preserveAspectRatio
Boolean

true to preserve the aspect ratio of the image; otherwise, false.

preventEnlarge
Boolean

true to prevent the enlargement of the image; otherwise, false.

Returns

The resized image.

Applies to