ImageEn, unit iemio

TImageEnMIO.LoadFromFileAuto

TImageEnMIO.LoadFromFileAuto


Declaration

function LoadFromFileAuto(const FileName: string): Boolean;


Description

Load an image from file into the attached TImageEnMView or TIEMultiBitmap. To detect the file format it analyzes the file content, it does not use the filename extension.
Result will be false if the file is not a recognized file type (Aborting will be true). Loading errors due to a file not being available will raise an exception.

ImageEn supports loading of multiple frames from GIF, TIFF, AVI, DCX, DICOM, ICO and CUR formats. Loading of PDF format is also supported if a relevant plug-in is installed.

Note: Existing content is not cleared. Call Clear to remove existing content before loading.


Example

ImageEnMView1.MIO.LoadFromFileAuto('input.dat');

ImageEnMView1.MIO.LoadFromFileAuto('input.tif'); // a tiff or a RAW?

if ImageEnMView1.MIO.LoadFromFileAuto(sFilename) = False then
  ShowMessage('Not a supported file type!');


See Also

 LoadFromFile