Graphics.GraphicExtension
Contents |
Delphi Information
From Graphics.pas
function GraphicExtension(GraphicClass: TGraphicClass): string;
Unit: Graphics
Type: function
Visibility: public
C++ Information
From Graphics.hpp
System::UnicodeString __fastcall GraphicExtension(System::TMetaClass * GraphicClass);
Unit: Graphics
Type: function
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 Samples