[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ImageSource

ImageSource Class

Represents an image source.

An ImageSource stores image data together with its ImageType so it can be supplied to APIs that accept image content. Use Stream to retrieve the image data as a stream and Type to retrieve the image format.

Inheritance
ImageSource
Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public class ImageSource
Public Class ImageSource
Examples
using MemoryStream imageStream = CreateSampleImageStream();
ImageSource imageSource = new ImageSource(imageStream, ImageType.PNG);
worksheet.OutlineColumn.CollapseIndicator = imageSource;
Stream stream = imageSource.Stream;

Constructors

Name Description
ImageSource(Stream, ImageType)

Initializes a new image source from an image stream and image type.

If stream is not null, this constructor reads the stream content and stores it in the image source. The specified type is assigned even when stream is null.

Properties

Name Description
Stream

Gets the image stream.

Returns a new stream over the stored image bytes when this instance contains image data. If no image data is available, this property returns null.

Type

Gets the type of the image.

Returns the ImageType that was assigned when this image source was created.