把图片缩小并保存: procedure ResizeBMP(BmpFile1,BmpFile2:String;w2,h2:Integer); {作用:将位图BmpFIle1调整大小为w,h并存盘于BmpFile2中} var Bmp1,Bmp2 :TBitmap; w1,h1:Integer; begin Bmp1 :=TBitmap.Create; Bmp2 :=TBitmap.Create; Bmp1.LoadFromFile(BmpFile1); w1:=Bmp1.Width; h1:=Bmp1.Height; Bmp2.Width :=w1*w2 div w1; Bmp2.Height :=h1*h2 div h1; SetStretchBltMode(Bmp2.Canvas.Handle,HalfTone); StretchBlt(Bmp2.Canvas.Handle,0,0,w2,h2, Bmp1.Canvas.Handle,0,0,w1,h1,SRCCOPY); Bmp2.SaveToFile(BmpFile2); Bmp1.Free; Bmp2.Free; end; procedure TForm1.BitBtn1Click(Sender: TObject); begin //把照片缩放到100*200大小 ResizeBmp('d:/1234.bmp','c:/2234.bmp',300,400); //显示缩放后的照片 Image1.Picture.Bitmap.LoadFromFile('c:/2234.bmp'); end;