.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

OfficeImage.CanGetImageBytes(OfficeImageFormat) Method

Indicates whether the OfficeImage descendant can get image data as an array of bytes.

Namespace: DevExpress.Office.Utils

Assembly: DevExpress.Office.v21.1.Core.dll

Declaration

public abstract bool CanGetImageBytes(
    OfficeImageFormat imageFormat
)

Parameters

Name Type Description
imageFormat OfficeImageFormat

An OfficeImageFormat enumeration member specifying the format of the resulting image data.

Returns

Type Description
Boolean

true if the OfficeImage descendant implements the GetImageBytes method; otherwise, false.

Remarks

Use the CanGetImageBytes method to check whether the OfficeImage descendant for the current platform implements the OfficeImage.GetImageBytes method for a specified image format.

You can skip the check and use the OfficeImage.GetImageBytesSafe method, which will attempt to get image data in the original format, and if the attempt fails, get the data in PNG format.

See Also