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

Represents an image editing operation that crops an image to a specified rectangle.

Definition

Namespace:Telerik.Web.UI.ImageEditor

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public class CropOperation : ImageOperation, IImageOperation

Inheritance: objectImageOperationCropOperation

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 CropOperation(Rectangle rectangle, int index)
Parameters:rectangleRectangleindexint
C#
public CropOperation(Rectangle rectangle)
Parameters:rectangleRectangle

Properties

Gets the name of the image operation.

C#
public string Name { get; }

Implements: IImageOperation.Name

Gets or sets the rectangle defining the crop region in the source image.

C#
public Rectangle Rectange { get; set; }

Methods

Crops the provided image using the specified Rectange coordinates.

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

The original image to crop.

Returns:

Image

A new Image containing only the cropped region.

Implements: IImageOperation.Apply(Image)