i think the buffer is a byte array for what is " file like" data.
in other words similar to a binary jpeg.
check the comment on " compress image" and " decompress image" https://github.com/EpicGames/UnrealEngine/blob/a3cb3d8fdec1fc32f071ae7d22250f33f80b21c4/Engine/Source/Runtime/Engine/Public/ImageUtils.h#L130
i dont see an export equivalent for the import buffer as texture 2d
i think you might get more luck using “ExportTexture2D” and " ImportFileAsTexture2D" (both manipulates a file directly and uses a filename).