Tex.FromMemory

static Tex FromMemory(Byte[]& data, bool sRGBData)

   
Byte[]& data The binary data of an image file, this is NOT a raw RGB color array!
bool sRGBData Is this image color data in sRGB format, or is it normal/metal/rough/data that’s not for direct display? sRGB colors get converted to linear color space on the graphics card, so getting this right can have a big impact on visuals.
RETURNS: Tex A Tex asset from the given file, or null if it failed to load.

Loads an image file stored in memory directly into a texture! Supported formats are: jpg, png, tga, bmp, psd, gif, hdr, pic. Asset Id will be the same as the filename.