Look at GetPixelDirect for details.
procedure ImGetPixelDirect(const Image: TImageData; X: LongInt; Y: LongInt; Pixel: Pointer); cdecl;
ImagingExport (at line 150)