ImageEn, unit iemview

TImageEnMView.SetImageFromFile

TImageEnMView.SetImageFromFile


Declaration

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


Description

Loads an image from a file and assigns it to the TImageEnMView at index, idx.
Use SourceImageIndex to specify the image index if the source file is a multi-frame file (such as a TIFF or AVI).
Specify a FileFormat for the file if the extension does not match its type.


Example

idx := ImageEnMView1.AppendImage;
ImageEnMView1.SetImageFromFile(idx, 'D:\myfile.jpg');


See Also

SetImage
SetImageFromStream