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

Represents an Image that can be edited.

Definition

Namespace:Telerik.Web.UI.ImageEditor

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public class EditableImage : IDisposable

Inheritance: objectEditableImage

Implements: IDisposable

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

Constructors

Creates an instance of the EditableImage class from a given Image object, and the Graphics core used for image manipulation.

C#
public EditableImage(Image image, IGraphicsCore core)
Parameters:imageImage

The image object from which EditableImage will be created.

coreIGraphicsCore

The IGraphicsCore object to use for image manipulation.

Creates an instance of the EditableImage class from a given Image object.

C#
public EditableImage(Image image)
Parameters:imageImage

The image object from which EditableImage will be created.

Creates an instance of the EditableImage class from a given Stream.

C#
public EditableImage(Stream stream)
Parameters:streamStream

The Stream from which the editable image will be created.

Creates an instance of the EditableImage class from a specified location.

C#
public EditableImage(string imagePath)
Parameters:imagePathstring

A physical path to the image.

Properties

Gets the format of the image being edited.

C#
public virtual string Format { get; }

Gets the height of the image.

C#
public virtual int Height { get; }

Gets the actual Bitmap that is being edited.

C#
public virtual Image Image { get; }

Gets a bool value that indicates whether the dispose method of the EditableImage has been called.

C#
public virtual bool IsDisposed { get; protected set; }

Gets the ImageFormat of the image being edited.

C#
public virtual ImageFormat RawFormat { get; }

Gets the size of the image. (Pair of width and height of the image.)

C#
public virtual Size Size { get; }

Gets the width of the image.

C#
public virtual int Width { get; }

Methods

Adds text to the image.

C#
public void AddText(Point position, ImageText text)
Parameters:positionPoint

The position of the text.

textImageText

The Image text to add.

Applies the IImageOperation(s) to the current image in the order they appear in the operations collection.

C#
public void ApplyImageOperations(IEnumerable<IImageOperation> operations)
Parameters:operationsIEnumerable<IImageOperation>

Collection of IImageOperation(s) to apply.

C#
public void CalculateImageFormat()

Changes the transparency of the current image.

C#
public void ChangeOpacity(double opacity)
Parameters:opacitydouble

A double value between 0.00 - 1.00, representing the opacity. Passing 1 means no opacity.

Creates an identical object of the editable image.

C#
public EditableImage Clone()
Returns:

EditableImage

The cloned editable image.

Changes the format of the editable image.

C#
public void ConvertTo(EditableFormat format)
Parameters:formatEditableFormat

The new image format of the editable image.

Copy the containing Image information to a Stream

C#
public void CopyToStream(Stream stream)
Parameters:streamStream

The stream, to which Image data will be saved

Crop the image into the given rectangle.

C#
public void Crop(Rectangle rectange)
Parameters:rectangeRectangle

The rectangle to crop the image into.

Disposes the EditableImage object.

C#
public void Dispose()

Implements: IDisposable.Dispose()

C#
protected virtual void Dispose(bool disposing)
Parameters:disposingbool

Fixes a problem with the Gif file format support in the .NET framework.

C#
public void FixGifColors()

Flips the image in the specified direction.

C#
public void Flip(FlipDirection direction)
Parameters:directionFlipDirection

The flipping direction. (Possible values: Vertical, Horizontal and Both)

Inserts additional image into the editable image.

C#
public void InsertImage(Point position, Image imgToInsert)
Parameters:positionPoint

The position of the inserted image.

imgToInsertImage

The image that will be inserted.

Replaces the current Image object of the EditableImage.

C#
public void ReplaceImage(Image image)
Parameters:imageImage

The Image object to replace the existing Image with.

Resizes the image to the width and height specified.

C#
public void Resize(int width, int height)
Parameters:widthint

The new width to apply.

heightint

The new height to apply.

Resizes the image to the size specified.

C#
public void Resize(Size size)
Parameters:sizeSize

The new dimensions (size) of the image.

Rotates the image clockwise, in the specified rotation direction.

C#
public void Rotate(Rotation rotate)
Parameters:rotateRotation

The rotation direction.(Possible values of clockwise rotation: Rotate90, Rotate180 and Rotate270).