ImageEn, unit iemview

TImageEnMView.SetImageFromFile

TImageEnMView.SetImageFromFile

Declaration

function SetImageFromFile(Index: Integer; const FileName: WideString; SourceImageIndex: Integer = 0; FileType: TIOFileType = ioUnknown): Boolean;

Description

Loads an image from a file and assigns it to the TImageEnMView at Index.
Use SourceImageIndex to specify the image index if the source file is a multi-frame file (such as a TIFF or AVI).
FileType specifies the file format of the image. If ioUnknown is specified, the file extension is used to determine the format (e.g. ioJPEG for "Image.jpg").

Example

// Set image from file
Index := ImageEnMView1.AppendImage();
ImageEnMView1.SetImageFromFile(Index, 'D:\myfile.jpg');

See Also

SetImage
SetImageFromStream