Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

OfficeImage.GetImageBytesSafe(OfficeImageFormat) Method

Attempts to get image data as an array of bytes in specified format, and in case of failure gets the data in PNG format.

Namespace: DevExpress.Office.Utils

Assembly: DevExpress.Office.v24.2.Core.dll

NuGet Package: DevExpress.Office.Core

#Declaration

public virtual byte[] GetImageBytesSafe(
    OfficeImageFormat imageFormat
)

#Parameters

Name Type Description
imageFormat OfficeImageFormat

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

#Returns

Type Description
Byte[]

An array of bytes containing image data.

#Remarks

Use the OfficeImage.GetImageBytes to get image data as an array of bytes in the specified format.

See Also