Show / Hide Table of Contents

Class GenericImageHandler

The internal generic handler for image formats used in EPPlus.

Inheritance
object
GenericImageHandler
Implements
IImageHandler
Inherited Members
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 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
Exception

SupportedTypes

Supported types by the image handler

Declaration
public HashSet<ePictureType> SupportedTypes { get; }
Property Value
Type Description
HashSet<ePictureType>

Methods

GetImageBounds(MemoryStream, ePictureType, out double, out double, out double, out double)

Retrieves 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
MemoryStream image

The image data

ePictureType type

Type type of image

double width

The width of the image

double height

The height of the image

double horizontalResolution

The horizontal resolution in DPI

double verticalResolution

The vertical resolution in DPI

Returns
Type Description
bool

ValidForEnvironment()

Returns if the handler is valid for the environment. The generic image handler is valid in all environments, so it will always return true.

Declaration
public bool ValidForEnvironment()
Returns
Type Description
bool

Implements

OfficeOpenXml.Interfaces.Drawing.Image.IImageHandler
In this article
Back to top Generated by DocFX