Class GenericImageHandler
The internal generic handler for image formats used in EPPlus.
Inheritance
System.Object
GenericImageHandler
Implements
OfficeOpenXml.Interfaces.Drawing.Image.IImageHandler
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OfficeOpenXml.Drawing
Assembly: EPPlus.dll
Syntax
public class GenericImageHandler : IImageHandler
Properties
LastException
The last exception that occured when calling GetImageBounds(MemoryStream, ePictureType, out Double, out Double, out Double, out Double)
Declaration
public Exception LastException { get; }
Property Value
Type | Description |
---|---|
System.Exception |
SupportedTypes
Supported types by the image handler
Declaration
public HashSet<ePictureType> SupportedTypes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.HashSet<OfficeOpenXml.Drawing.ePictureType> |
Methods
GetImageBounds(MemoryStream, ePictureType, out Double, out Double, out Double, out Double)
Retreives the image bounds and resolution for an image
Declaration
public bool GetImageBounds(MemoryStream image, ePictureType type, out double width, out double height, out double horizontalResolution, out double verticalResolution)
Parameters
Type | Name | Description |
---|---|---|
System.IO.MemoryStream | image | The image data |
OfficeOpenXml.Drawing.ePictureType | type | Type type of image |
System.Double | width | The width of the image |
System.Double | height | The height of the image |
System.Double | horizontalResolution | The horizontal resolution in DPI |
System.Double | verticalResolution | The vertical resolution in DPI |
Returns
Type | Description |
---|---|
System.Boolean |
ValidForEnvironment()
Returns if the handler is valid for the enviornment. The generic image handler is valid in all environments, so it will always return true.
Declaration
public bool ValidForEnvironment()
Returns
Type | Description |
---|---|
System.Boolean |
Implements
OfficeOpenXml.Interfaces.Drawing.Image.IImageHandler