public void DataXY()
{
string mapPath = HttpContext.Current.Server.MapPath(@"~/images/大坝.jpg");
System.Drawing.Bitmap image = new Bitmap(mapPath); using (Bitmap img = new Bitmap(image))
{
using (Graphics g = Graphics.FromImage(img))
{
try
{
//画图片的背景噪音线
foreach (Model.Eqpmentlocation model in bll.GetList())
{
locaX = model.LocationX; //绘制X坐标
locaY = model.LocationY; //绘制Y坐标
g.DrawRectangle(new Pen(Color.Blue), locaX, locaY, 3, 3);
}
img.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
//this.Literal1.Text = "Imgvalue=\"" + img + "\";";
//Response.Write("whwhwwhi");
Response.Write(img);
ImagesWifi();
Response.End();
}
finally
{
g.Dispose();
image.Dispose();
}
}
}
}
{
string mapPath = HttpContext.Current.Server.MapPath(@"~/images/大坝.jpg");
System.Drawing.Bitmap image = new Bitmap(mapPath); using (Bitmap img = new Bitmap(image))
{
using (Graphics g = Graphics.FromImage(img))
{
try
{
//画图片的背景噪音线
foreach (Model.Eqpmentlocation model in bll.GetList())
{
locaX = model.LocationX; //绘制X坐标
locaY = model.LocationY; //绘制Y坐标
g.DrawRectangle(new Pen(Color.Blue), locaX, locaY, 3, 3);
}
img.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
//this.Literal1.Text = "Imgvalue=\"" + img + "\";";
//Response.Write("whwhwwhi");
Response.Write(img);
ImagesWifi();
Response.End();
}
finally
{
g.Dispose();
image.Dispose();
}
}
}
}
解决方案 »
- 各位大侠,如何给一段内容的img标签的src属性的图片路径加上一写字符
- 发布网站时,怎样编译指定行呢?
- asp.net使用dotnetopenmail发送邮件出现奇怪问题,请教高手解答!!!
- substring 查询限定字符问题。高人指点
- 在VS2008 SP1中文版下如何安装使用sileverlight 2.0?
- TreeView2.0的CheckBox取值问题(请大侠帮个忙,急呀)
- -----SQL里的聚合字段sum_qty和sum_amount如何放到水晶报表?-----(满意给50分)
- 怎么实现一个超级连接呢?在线等待,烦恼的问题!!
- 日期与oracle的问题。
- 请问ocx是什么格式,他是用什么写的
- 求助-数据回传的问题
- 时间转换问题,求大神指教....
img 的src 链接指向 ashx
http://www.cnblogs.com/insus/archive/2013/05/16/3081055.htmlhttp://www.cnblogs.com/insus/archive/2013/02/05/2892678.htmlhttp://www.cnblogs.com/insus/archive/2011/04/02/2003740.html