如何从一张图片中裁剪一部分距形图片另存为文件? 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;

 

http://www.cnblogs.com/hssbsw/p/3335656.html

相关文章:

  • 2021-05-28
  • 2022-12-23
  • 2021-12-23
  • 2021-07-25
  • 2021-04-22
  • 2021-12-16
  • 2022-12-23
  • 2021-08-08
猜你喜欢
  • 2022-02-27
  • 2021-09-08
  • 2022-01-06
  • 2021-12-29
  • 2021-11-28
  • 2022-12-23
相关资源
相似解决方案