TImageEnIO.LoadFromFileAuto
Declaration
function LoadFromFileAuto(const FileName: WideString): Boolean; dynamic;
Description
Loads an image from file. Unlike
LoadFromFile it ignores the file extension, instead it analyzes the file content to determine its format. Result will be false if the file is not a recognized file type (and
Aborting will be true). Loading errors due to a file not being available will raise an exception.
Note:
◼You can abort loading by setting
Aborting to true
◼This method can load IEV (
TImageEnVect objects) and IEN+IEV formats when
AttachedImageEn is TImageEnView or TImageEnVect.
ImageEnView1.IO.LoadFromFileAuto('C:\input.dat');
ImageEnView1.IO.LoadFromFileAuto('C:\input.tif'); // a tiff or a RAW?
if ImageEnView1.IO.LoadFromFileAuto(sFilename) = False then
ShowMessage('Not a supported file type!');
See Also
◼LoadFromFile◼WicFastLoading