Checks given stream for every supported image file format and if the stream is in one of them returns its string identifier (which can be used in LoadFromStream/LoadFromMem type functions).
function DetermineStreamFormat(Stream: TStream): string;
Imaging (at line 83)
If stream is not in any of the supported formats empty string is returned.