/Engine/Source/Runtime/ImageWrapper/Public/IImageWrapperModule.h
Detect image format by looking at the first few bytes of the compressed image data. You can call this method as soon as you have 8-16 bytes of compressed file content available.
the detected format or EImageFormat::Invalid if the method could not detect the image format.
EImageFormat DetectImageFormat ( const void * InCompressedData, int64 InCompressedSize )