Vcl.Graphics.GraphicExtension

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GraphicExtension(GraphicClass: TGraphicClass): string;

C++

extern DELPHI_PACKAGE System::UnicodeString __fastcall GraphicExtension(TGraphicClass GraphicClass);

Properties

Type Visibility Source Unit Parent
function public
Vcl.Graphics.pas
Vcl.Graphics.hpp
Vcl.Graphics Vcl.Graphics

Description

Returns the default file-name extension of a graphics object.

Call GraphicExtension to obtain a default extension value for the DefaultExt property of an Open, Open Picture, Save Picture or Save dialog. GraphicExtension returns the default extension for the type of graphics object specified by the GraphicClass parameter. In Delphi, the TGraphicClass type is the class type for descendants TGraphic.

These are the file extensions returned for each built-in graphics class:



Graphic class File extension returned

TBitmap

bmp

TIcon

ico

TMetafile

emf



If custom graphics classes register a file extension, GraphicExtension will return that extension when passed the custom graphics class as an argument.

See Also

Code Examples