http://community.csdn.net/Expert/topic/3138/3138927.xml?temp=.8675959

解决方案 »

  1.   

    不大理解你的要求
    你是要一个HTML Web编辑器?
      

  2.   

    to guxiangdefeng(故乡的风) :  那个网站不喜欢,普通用户根本没办法下载,控件又少to NoFile(无文件)   主要aspx输出图片,比如做一张签名图片,图片里可以显示用户IP等信息
      

  3.   

    你的目的是不是在已有的图片上添加文字?Image image=Image.FromFile("文件路径");
    Graphics g = Graphics.FromImage(image);
    g.DrawString("IP地址", new Font("黑体", 14, FontStyle.Bold ), SystemBrushes.WindowText, new Point(10,2));
    image.Save( HttpContext.Current.Response.OutputStream, ImageFormat.Jpeg);
    g.Dispose();
    image.Dispose();
    HttpContext.Current.Response.End();
      

  4.   

    to goody9807() :
      现在还没收到,你确认你发了吗?[email protected]谢谢~~NoFile(无文件) :
      命名空间是什么??using System.Drawing;
    System.Web.UI.WebControls.Image 没有FromFile,不晓得怎么写,请详细一点,谢谢啦~
      

  5.   

    // 在此处放置用户代码以初始化页面
    Bitmap newBitmap = new Bitmap(360,90,PixelFormat.Format32bppArgb);//根据上面创建的位图对象创建绘图面
    Graphics g = Graphics.FromImage(newBitmap);
    //以指定的颜色填充矩形区
    g.FillRectangle(new SolidBrush(Color.White), new Rectangle(0,0,360,90));//创建字体对象
    Font textFont = new Font("宋体",10);
    //创建RectangleF结构指定一个区域
    RectangleF rectangle = new RectangleF(0,0,360,90);
    //创建随机数对象
    Random rd = new Random();
    //取得随机数
    //int valationNo = 1000 + rd.Next(8999);
    //使用指定的颜色填充上面RectangleF结构指定的矩形区域
    //g.FillRectangle(new SolidBrush(Color.BurlyWood), rectangle);
    //在上面填充的矩形区域中填充上面生成的随机数
    g.DrawString("你的IP:" + Request.UserHostAddress.ToString() + "\n访问时间:" + DateTime.Now.ToString(), new Font("宋体",10), new SolidBrush(Color.Blue), new RectangleF(0,0,360,90));
    newBitmap.Save(HttpContext.Current.Response.OutputStream, ImageFormat.Jpeg);g.Dispose();
    newBitmap.Dispose();
    HttpContext.Current.Response.End();