Generate texture2D from a TArray<FColor> buffer

Hi, I’m trying to generate a texture2D from the TArray buffer.
I receive this buffer after the broadcast of the delegate OnScreenshotCaptured.
How I can do this?