Is this the most efficient and fastest way to determine if a file is an image file (that can be loaded in ImageEn)?
function CanLoadImage(const AFile: string): Boolean;
var
ImageEnIO: TImageEnIO;
begin
Result := True;
ImageEnIO := TImageEnIO.Create(nil);
try
try
ImageEnIO.LoadFromFileAuto(AFile);
except
on E: Exception do
Result := False;
end;
finally
ImageEnIO.Free;
end;
end;