New to Telerik Document ProcessingStart a free 30-day trial

Wraps image bytes and format information for embedding and reuse across document parts.

Definition

Namespace:Telerik.Windows.Documents.Media

Assembly:Telerik.Windows.Documents.Core.dll

Syntax:

C#
public class ImageSource

Inheritance: objectImageSource

Derived Classes: UriImageSource

Constructors

Initializes a new instance of the ImageSource class.

C#
public ImageSource(byte[] data, string extension)
Parameters:databyte[]

Byte array containing representation of the image source.

extensionstring

The image file extension.

Initializes a new instance of the ImageSource class.

C#
public ImageSource(Stream stream, string extension)
Parameters:streamStream

The stream which represents the image.

extensionstring

The format of the image.

Properties

Gets the byte array representation of the image source.

C#
public virtual byte[] Data { get; }
Property Value:

The byte array representation of the image source.

Gets the image file extension.

C#
public virtual string Extension { get; }
Property Value:

The image file extension.