Class GenericImageHandler
- Namespace
- OfficeOpenXml.Drawing
- Assembly
- EPPlus.dll
The internal generic handler for image formats used in EPPlus.
public class GenericImageHandler : IImageHandler
- Inheritance
-
GenericImageHandler
- Implements
-
IImageHandler
- Inherited Members
Constructors
GenericImageHandler()
public GenericImageHandler()
Properties
LastException
The last exception that occured when calling GetImageBounds(MemoryStream, ePictureType, out double, out double, out double, out double)
public Exception LastException { get; }
Property Value
SupportedTypes
Supported types by the image handler
public HashSet<ePictureType> SupportedTypes { get; }
Property Value
- HashSet<ePictureType>
Methods
GetImageBounds(MemoryStream, ePictureType, out double, out double, out double, out double)
Retreives the image bounds and resolution for an image
public bool GetImageBounds(MemoryStream image, ePictureType type, out double width, out double height, out double horizontalResolution, out double verticalResolution)
Parameters
image
MemoryStreamThe image data
type
ePictureTypeType type of image
width
doubleThe width of the image
height
doubleThe height of the image
horizontalResolution
doubleThe horizontal resolution in DPI
verticalResolution
doubleThe vertical resolution in DPI
Returns
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.
public bool ValidForEnvironment()