程序较为简单,不做其它说明了.
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');//原文件
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');//指定大小后的文件
s.Free;
end;