Skip to content

Class GenericImageHandler

Namespace: OfficeOpenXml.Drawing
Assembly: EPPlus.dll

The internal generic handler for image formats used in EPPlus.

public class GenericImageHandler : IImageHandler

Inheritance

object ← GenericImageHandler

Implements

IImageHandler

Inherited Members

object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()

Constructors

GenericImageHandler()

public GenericImageHandler()

Properties

LastException

The last exception that occured when calling GetImageBounds(MemoryStream, ePictureType, double, double, double, double)

public Exception LastException { get; }

Property Value

Exception

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)

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

The image data

type ePictureType

Type type of image

width double

The width of the image

height double

The height of the image

horizontalResolution double

The horizontal resolution in DPI

verticalResolution double

The vertical resolution in DPI

Returns

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.

public bool ValidForEnvironment()

Returns

bool