New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Definition

Namespace:Telerik.Web.UI.ImageEditor

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public class ResizeOperation : ImageOperation, IImageOperation

Inheritance: objectImageOperationResizeOperation

Implements: IImageOperation

Inherited Members ImageOperation.Indexobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
[SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public ResizeOperation(Size size, int index)
Parameters:sizeSizeindexint
C#
public ResizeOperation(Size size)
Parameters:sizeSize

Properties

The name of the operation

C#
public string Name { get; }

Implements: IImageOperation.Name

C#
public Size Size { get; set; }

Methods

Applies the operation against the provided image.

C#
public Image Apply(Image original)
Parameters:originalImageReturns:

Image

The resultant image of the applied graphics operation

Implements: IImageOperation.Apply(Image)

Resize the image using a specific interpolation mode.

C#
public Image Resize(Image originalImg, Size newSize, InterpolationMode intMode)
Parameters:originalImgImage

The original image to resize.

newSizeSize

The new image size.

intModeInterpolationMode

The interpolation mode to use. All modes except NearestNeighbor will cause a small loss (1-2 px) of image data around the edges of the original image.

Returns:

Image

The resized image. If the new size is identical to the original size, then the original image is returned.