日期:2014-05-17 浏览次数:20836 次
System.Drawing.Image img1 = System.Drawing.Image.FromFile(@"C:\Documents and Settings\Administrator\My Documents\1\图片\1024.jpg");
System.Drawing.Image img2 = System.Drawing.Image.FromFile(@"C:\Documents and Settings\Administrator\My Documents\1\图片\sb555.jpg");
Bitmap newImg = new Bitmap(img1.Width + img2.Width, (img1.Height > img2.Height) ? img1.Height : img2.Height);
Graphics g = Graphics.FromImage(newImg);
g.Clear(Color.Blue);
g.DrawImageUnscaled(img1, 0, 0);
g.DrawImageUnscaled(img2, img1.Width, 0);
newImg.Save(@"C:\test.jpg");
Response.ContentType = "image/jpeg";
Response.WriteFile(@"C:\test.jpg");