Look at RotateImage for details.
function ImRotateImage(var Image: TImageData; Angle: Single): Boolean; cdecl;
ImagingExport (at line 134)