Skip to main content

TdxOfficeImage.GetContentType(TdxOfficeImageFormat) Method

Returns the MIME content type identifier corresponding to the specified Office image format.

Declaration

class function GetContentType(AImageFormat: TdxOfficeImageFormat): string; static;

Parameters

Name Type
AImageFormat TdxOfficeImageFormat

Returns

Type
string

Remarks

The Rich Edit control’s OpenXML document export routines automatically call the GetContentType and GetExtension functions to save images into a DOCX/DOTX file.

You can call this class function to obtain the media type identifier of the Office image format passed as the AImageFormat parameter. The GetContentType function can return an empty string for certain formats, since not all of them have the corresponding MIME type identifiers. Refer to the TdxOfficeImageFormat type description for detailed information on the function results corresponding to all possible AImageFormat parameter values.

See Also