Vcl.Graphics.TPicture.LoadFromFile

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure LoadFromFile(const Filename: string);

C++

void __fastcall LoadFromFile(const System::UnicodeString Filename);

Properties

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

Description

Reads the file specified in Filename and loads the data into the TPicture object.

Use LoadFromFile to read a picture from disk. The TGraphic class created is determined by the file extension of the file. If the file extension is not recognized an EInvalidGraphic exception is raised.

See Also

Code Examples