FromFile(FileName: String): IGxImage;
FileName. The path and the name of the file that contains the image.
The FromFile method returns the image obtained from the file.
Executing the example requires a form that contains a button and the ImageBox component named ImageBox1. The file system should contain the file C:\TestImg.bmp file.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Image: IGxImage;
Begin
Image := GxImage.FromFile("C:\TestImg.bmp");
ImageBox1.Image := Image;
End Sub Button1OnClick;
Clicking the button loads the image from the specified file to the ImageBox1 component.
See also: