<img src="abc.aspx">
怎样让abc.aspx输出图片?

解决方案 »

  1.   

    Response.WriteFile("d:\\aa.jpg");
      

  2.   

    没说清楚,123.aspx有一<img src="abc.aspx">
    abc.aspx如何做才能让图片显示在123.aspx?
      

  3.   

    就用Response.WriteFile(本地绝对地址)
    Response.End();
      

  4.   

    就象站长统计类似的,<a href="http://www.51.la/?915943" target="_blank"><img alt="&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;" src="http://img.users.51.la/915943.asp" style="border:none" /></a>图片的src是一个页面
      

  5.   

    Font ULfont = new Font("Arial", 9, FontStyle.Underline);
           // Font font = new Font("Arial", 10, FontStyle.Regular);
            SolidBrush brush = new SolidBrush(Color.Red);
            string name = "国家统计局19日发布的初步核算数据显示,一季度中国经济同比增长11.1%,增速比上年全年加快0.4个百分点,比上年同期加快0.7个百分点。!新华网报道,一季度中国经济延续了2003年以来两位数加速增长的势头,经济繁荣期不断延长。从2003年到2006年的中国经济增长率依次为10.0%、10.1%、10.4%、10.7%。   国家统计局在国务院新闻办公室举行的新闻发布会上发布的数据显示,一季度中国国内生产总值为50287亿元。其中,第一产业增加值3631亿元,同比增长4.4%;第二产业增加值25552亿元,增长13.2%;第三产业增加值21104亿元,增长9.9%";
            Bitmap bmp = new Bitmap(400, 500);
            Graphics g = Graphics.FromImage(bmp);        int x = 0;
            int y = 0;
            int iPos = 0;
            int iWidth = 0;
            int iHeight = 0;
            string strPrint = String.Empty;
            while (iPos < name.Length)
            {
                strPrint = name.Substring(iPos, 1);
                SizeF sz = g.MeasureString(strPrint, ULfont);
                iWidth =  Convert.ToInt32(sz.Width);
                iHeight = Convert.ToInt32(sz.Height);
                if (iWidth + x > bmp.Width)
                {
                    x = 0;
                    y += iHeight+5; //加行距
                }
                            g.DrawString(strPrint, ULfont, brush, x, y);
                x += iWidth-4;
                iPos++;
            }
            bmp.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif);        Response.End();
      

  6.   

    Bitmap bmp=new Bitmap()如果想导入一张图片,怎么弄?
      

  7.   

    System.Drawing.Bitmap map=new Bitmap(写图片文件的路径);
    //调整图片的长短比
    double dl;
    if(map.Width>=map.Height)
    {
    dl=(double)(maxlength/(double)map.Width);
    }
    else
    {
    dl=(double)(maxlength/(double)map.Height);
    }
    //构建新的图片
    System.Drawing.Bitmap newmap=new Bitmap(map,(int)(map.Height*dl),(int)(map.Width*dl));
    Response.Clear();
    //图片写入流中
    newmap.Save(Response.OutputStream,System.Drawing.Imaging.ImageFormat.Jpeg);
    //施放内存
    map.Dispose();
    newmap.Dispose();
      Response.End();
      

  8.   

    Bitmap map=new Bitmap(写图片文件的路径);
    图片文件的路径只能是本地路径吗?