CreateFromFile(FileName: String);
CreateFromFile(FileName: String);
FileName. The path and the name of the file that contains the image.
The CreateFromFile constructor creates a new image from the file specified in the FileName parameter.
Function GetImageFromFile(FileName: String): IGxImage;
Var
Img: IGxImage;
Begin
If File.Exists(FileName) Then
Img := New GxImage.CreateFromFile(FileName);
Return Img;
Else
Return Null;
End If;
End Function GetImageFromFile;
The function returns the image obtained from the file, path to which is specified as an input parameter.
Imports System.IO;
Imports Prognoz.Platform.Interop.Drawing;
Function GetImageFromFile(FileName: String): GxImage;
Var
Img: GxImage;
Begin
If File.Exists(FileName) Then
Img := New GxImageClass_2();
Img.CreateFromFile(FileName);
Return Img;
Else
Return Null;
End If;
End Function;
The function returns the image obtained from the file, path to which is specified as an input parameter.
See also: