Show / Hide Table of Contents

Class ExcelImage

Represents an image

Inheritance
object
ExcelImageReadOnly
ExcelImage
Inherited Members
ExcelImageReadOnly.HasImage
ExcelImageReadOnly.Type
ExcelImageReadOnly.ImageBytes
ExcelImageReadOnly.Bounds
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: OfficeOpenXml.Drawing
Assembly: EPPlus.dll
Syntax
public class ExcelImage : ExcelImageReadOnly

Constructors

ExcelImage()

Creates an ExcelImage to be used as template for adding images.

Declaration
public ExcelImage()

ExcelImage(byte[], ePictureType)

Creates an ExcelImage to be used as template for adding images.

Declaration
public ExcelImage(byte[] imageBytes, ePictureType pictureType)
Parameters
Type Name Description
byte[] imageBytes

The image as a byte array

ePictureType pictureType

The type of image loaded in the stream

ExcelImage(FileInfo)

Creates an ExcelImage to be used as template for adding images.

Declaration
public ExcelImage(FileInfo imageFile)
Parameters
Type Name Description
FileInfo imageFile

A FileInfo referencing the image file to load

ExcelImage(Stream, ePictureType)

Creates an ExcelImage to be used as template for adding images.

Declaration
public ExcelImage(Stream imageStream, ePictureType pictureType)
Parameters
Type Name Description
Stream imageStream

The stream containing the image

ePictureType pictureType

The type of image loaded in the stream

ExcelImage(string)

Creates an ExcelImage to be used as template for adding images.

Declaration
public ExcelImage(string imagePath)
Parameters
Type Name Description
string imagePath

A path to the image file to load

Methods

SetImage(ExcelImage)

Sets a new image.

Declaration
public ExcelImage SetImage(ExcelImage image)
Parameters
Type Name Description
ExcelImage image

The image object to use.

Returns
Type Description
ExcelImage
See Also
ExcelImage

SetImage(byte[], ePictureType)

Sets a new image.

Declaration
public ExcelImage SetImage(byte[] imageBytes, ePictureType pictureType)
Parameters
Type Name Description
byte[] imageBytes

The image as a byte array.

ePictureType pictureType

The type of image.

Returns
Type Description
ExcelImage

SetImage(FileInfo)

Sets a new image.

Declaration
public void SetImage(FileInfo imageFile)
Parameters
Type Name Description
FileInfo imageFile

The image file.

SetImage(Stream, ePictureType)

Sets a new image.

Declaration
public ExcelImage SetImage(Stream imageStream, ePictureType pictureType)
Parameters
Type Name Description
Stream imageStream

The stream containing the image.

ePictureType pictureType

The type of image.

Returns
Type Description
ExcelImage

SetImage(string)

Sets a new image.

Declaration
public void SetImage(string imagePath)
Parameters
Type Name Description
string imagePath

The path to the image file.

SetImageAsync(FileInfo)

Sets a new image.

Declaration
public Task<ExcelImage> SetImageAsync(FileInfo imageFile)
Parameters
Type Name Description
FileInfo imageFile

The image file.

Returns
Type Description
Task<ExcelImage>

SetImageAsync(Stream, ePictureType)

Sets a new image.

Declaration
public Task<ExcelImage> SetImageAsync(Stream imageStream, ePictureType pictureType)
Parameters
Type Name Description
Stream imageStream

The stream containing the image.

ePictureType pictureType

The type of image.

Returns
Type Description
Task<ExcelImage>

SetImageAsync(string)

Sets a new image.

Declaration
public Task<ExcelImage> SetImageAsync(string imagePath)
Parameters
Type Name Description
string imagePath

The path to the image file.

Returns
Type Description
Task<ExcelImage>
In this article
Back to top Generated by DocFX