The program is simpler and does not make other explanations.
Procedure TFORM1.BUTTON1CLICK (Sender: TOBJECT);
VAR
S: tbitmap;
RECT: TRECT;
RW, RH: Integer;
Begin
RW: = 400;
RH: = 300;
s: = tbitmap.create;
s.LoadFromfile ('c: /11.bmp'); // Original file
Rect.Left: = 0;
Rect.top:=0;
Rect.right: = rw;
Rect.bottom: = RH;
S.canvas.stretchDraw (RECT, S);
S.Width: = rw;
s.height: = rh;
S.SaveTofile ('c: /dd.bmp'); // Specify the size of the file after size
S.free;
END;