Class ExcelImage¶
Namespace: OfficeOpenXml.Drawing
Assembly: EPPlus.dll
Represents an image
Inheritance¶
Inherited Members¶
object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()
Constructors¶
ExcelImage()¶
Creates an ExcelImage to be used as template for adding images.
ExcelImage(string)¶
Creates an ExcelImage to be used as template for adding images.
Parameters¶
imagePath string
A path to the image file to load
ExcelImage(FileInfo)¶
Creates an ExcelImage to be used as template for adding images.
Parameters¶
imageFile FileInfo
A FileInfo referencing the image file to load
ExcelImage(Stream, ePictureType)¶
Creates an ExcelImage to be used as template for adding images.
Parameters¶
imageStream Stream
The stream containing the image
pictureType ePictureType
The type of image loaded in the stream
ExcelImage(byte[], ePictureType)¶
Creates an ExcelImage to be used as template for adding images.
Parameters¶
imageBytes byte[]
The image as a byte array
pictureType ePictureType
The type of image loaded in the stream
Properties¶
Bounds¶
The image bounds and resolution
Property Value¶
HasImage¶
If this object contains an image.
Property Value¶
ImageBytes¶
The image as a byte array.
Property Value¶
byte[]
Type¶
The type of image.
Property Value¶
ePictureType?
Methods¶
SetImage(string)¶
Sets a new image.
Parameters¶
imagePath string
The path to the image file.
SetImage(FileInfo)¶
Sets a new image.
Parameters¶
imageFile FileInfo
The image file.
SetImage(byte[], ePictureType)¶
Sets a new image.
Parameters¶
imageBytes byte[]
The image as a byte array.
pictureType ePictureType
The type of image.
Returns¶
SetImage(ExcelImage)¶
Sets a new image.
Parameters¶
image ExcelImage
The image object to use.
Returns¶
See Also¶
SetImage(Stream, ePictureType)¶
Sets a new image.
Parameters¶
imageStream Stream
The stream containing the image.
pictureType ePictureType
The type of image.
Returns¶
SetImageAsync(Stream, ePictureType)¶
Sets a new image.
Parameters¶
imageStream Stream
The stream containing the image.
pictureType ePictureType
The type of image.
Returns¶
SetImageAsync(string)¶
Sets a new image.
Parameters¶
imagePath string
The path to the image file.
Returns¶
SetImageAsync(FileInfo)¶
Sets a new image.
Parameters¶
imageFile FileInfo
The image file.