Is this the most efficient simulation of such a function?:
function TformMain.ImageFileCanBeLoaded(const aFilePath: string): Boolean;
begin
Result := iexBitmaps.FindFileFormat(aFilePath, ffFallbackToExtension) <> ioUnknown;
end;
Yes, though the risk with ffFallbackToExtension is that a file that has an invalid extension (such as a text file with a .JPEG extension) will be reported as loadable (ioJPEG).
If you use ffContentOnly:
Result := iexBitmaps.FindFileFormat(aFilePath, ffContentOnly) <> ioUnknown;
Then the file is almost certainly loadable by ImageEn (though there will be a small number of file types like some DICOM that will be reported as ioUnknown, but are actually loadable).