请教为什么图片会粘不过去呢?以下是一些关键的代码
Bitmap bitmap = null; //按截图区域生成Bitmap
Image thumbImg = null; //被截图
Image test = null;
Graphics gps = null; //存绘图对象
bitmap = new System.Drawing.Bitmap(Convert.ToInt32(maxVal), Convert.ToInt32(maxVal));
thumbImg = System.Drawing.Image.FromFile(System.Web.HttpContext.Current.Server.MapPath(imgUrl));
System.Drawing.Rectangle rl = new System.Drawing.Rectangle(Convert.ToInt32(pointX), Convert.ToInt32(pointY), Convert.ToInt32(maxVal), Convert.ToInt32(maxVal)); //得到截图矩形
gps = System.Drawing.Graphics.FromImage(bitmap);
gps.DrawImage(thumbImg, 0, 0, rl, System.Drawing.GraphicsUnit.Pixel);
1 回答
- 1 回答
- 0 关注
- 784 浏览
添加回答
举报
0/150
提交
取消