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

An implementation of IGraphicsCore that uses IImageOperations internally

Definition

Namespace:Telerik.Web.UI.ImageEditor

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public class GDIOperationsBasedGraphicsCore : IGraphicsCore

Inheritance: objectGDIOperationsBasedGraphicsCore

Implements: IGraphicsCore

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

Constructors

C#
public GDIOperationsBasedGraphicsCore()

Methods

Adds text to the image on the provided position.

C#
public Image AddText(Image image, Point position, ImageText text)
Parameters:imageImage

The original image being the base for the operation

positionPoint

The top/left position relative to the original image.

textImageText

The definition of the test to insert, including the content itself

Returns:

Image

The resultant image of the applied graphics method

Implements: IGraphicsCore.AddText(Image, Point, ImageText)

Applies the provided image operation agaist the original image

C#
public virtual Image ApplyOperation(Image image, IImageOperation operation)
Parameters:imageImage

The original image being the base for the operation

operationIImageOperation

The operation to apply

Returns:

Image

The resultant image of the applied graphics method

Defines the changes of the pixel opacity of the provided Image

C#
public Image ChangeOpacity(Image image, double opacity)
Parameters:imageImage

The original image being the base for the operation

opacitydouble

The level of opacity. Should be in the range [0-1].

Returns:

Image

The resultant image of the applied graphics method

Implements: IGraphicsCore.ChangeOpacity(Image, double)

Converts the image to the specified format. This change may degrade the quality of the image.

C#
public Image ConvertTo(Image original, EditableFormat format)
Parameters:originalImage

The original image being the base for the operation

formatEditableFormat

The format of the resultant image

Returns:

Image

The resultant image of the applied graphics method

Implements: IGraphicsCore.ConvertTo(Image, EditableFormat)

Crops the provided image using the specified rectangular box

C#
public Image Crop(Image image, Rectangle rectange)
Parameters:imageImage

The original image being the base for the operation

rectangeRectangle

The bounding box specifying the cropping area

Returns:

Image

The resultant image of the applied graphics method

Implements: IGraphicsCore.Crop(Image, Rectangle)

Flips the image content in the specified direction

C#
public Image Flip(Image image, FlipDirection direction)
Parameters:imageImage

The original image being the base for the operation

directionFlipDirection

The direction of the flip change.

Returns:

Image

The resultant image of the applied graphics method

Implements: IGraphicsCore.Flip(Image, FlipDirection)

Insert another image within the original image at the specified location.

C#
public Image InsertImage(Image image, Point position, Image imageToInsert)
Parameters:imageImage

The original image being the base for the operation

positionPoint

The top/left coordinates relative to the original image.

imageToInsertImage

The image that should be inserted in the original image

Returns:

Image

The resultant image of the applied graphics method

Implements: IGraphicsCore.InsertImage(Image, Point, Image)

Resizes the original image by shrinking or expanding it by the provided dimensions

C#
public Image Resize(Image image, Size size)
Parameters:imageImage

The original image being the base for the operation

sizeSize

The new dimensions of the image

Returns:

Image

The resultant image of the applied graphics method

Implements: IGraphicsCore.Resize(Image, Size)

Rotates the image using the enumerated rotation. Currently only rectangular angles' are supported - 90°, 180°, 270°

C#
public Image Rotate(Image image, Rotation rotate)
Parameters:imageImage

The original image being the base for the operation

rotateRotation

The rotation direction for the rotation method

Returns:

Image

The resultant image of the applied graphics method

Implements: IGraphicsCore.Rotate(Image, Rotation)