C# 把两张图片重叠合并

public Image UniteImage(int width,int height,Image img1,Image img2)
{
    System.Drawing.Image img 
= new System.Drawing.Bitmap(width, height);

    System.Drawing.Graphics g 
= System.Drawing.Graphics.FromImage(img);

    g.Clear(System.Drawing.Color.Transparent);

    g.DrawImage(img1,
0,0,img1.Width,img1.Height); 
    g.DrawImage(img2,0,0,img2.Width,img2.Height);

    
return img;

}

 

posted @ 2011-08-07 21:16  therockthe  阅读(4333)  评论(0)    收藏  举报