Saves single image to given memory location.
function SaveImageToMemory(const Ext: string; Data: Pointer; var Size: LongInt; const Image: TImageData): Boolean;
Imaging (at line 132)
Memory must be allocated and its size is passed in Size parameter in which number of written bytes is returned. Ext identifies desired image file format (jpg, png, dds, ...).