Look at LoadImageFromMemory for details.
function ImLoadImageFromMemory(Data: Pointer; Size: LongInt; var Image: TImageData): Boolean; cdecl;
ImagingExport (at line 87)