如何从一张图片中裁剪一部分距形图片另存为文件?
如何从一张图片中裁剪一部分距形图片另存为文件? Delphi / Windows SDK/API
http://www.delphi2007.net/DelphiMultimedia/html/delphi_2006121112045369.html
如何从一张图片中裁剪一部分距形图片另存为文件?
需要一段实现的功能的代码
procedure TForm1.Button1Click(Sender: TObject);
var
SrcBmp, DestBmp: TBitmap;
begin
SrcBmp := TBitmap.Create;
SrcBmp.LoadFromFile('C:\Source.bmp');
DestBmp := TBitmap.Create;
DestBmp.Width := 100;
DestBmp.Height := 100;
DestBmp.Canvas.CopyRect(Rect(0, 0, 100,
100), SrcBmp.Canvas, Rect(50, 50, 150,
150));
DestBmp.SaveToFile('C:\Dest.bmp');
SrcBmp.Free;
DestBmp.Free;
end;