如何远程获取一张图片的地址?并将该图片添加上水印?
另外哪位高人能帮偶把这段代码改成.net的,在下感激不尽呀!这好象是有关asp的
<%
Response.ContentType = "image/*"  
On Error Resume Next
Dim bx,by,level
bx = Request.QueryString("bx") 
by = Request.QueryString("by")
level = Request.QueryString("level")
Const adTypeBinary = 1
Dim strFilePath
strFilePath = Server.MapPath("data/" & level & "/" & by & "/" & bx & ".png") 
Set objStream = Server.CreateObject("ADODB.Stream")  //创建一个流的对象
objStream.Open
objStream.Type = adTypeBinary
objStream.LoadFromFile strFilePath
If Err <> 0 Then
objStream.LoadFromFile Server.MapPath("data/nopic.png")
End If
Response.BinaryWrite objStream.Read  //从新读取图片
objStream.Close
Set objStream = Nothing //释放流
%>

解决方案 »

  1.   

    在.net版里搜,有人问个这个问题。
      

  2.   

    http://community.csdn.net/Expert/topic/4195/4195666.xml?temp=.9184992
      

  3.   

    http://community.csdn.net/Expert/topic/4142/4142553.xml?temp=.7076532
      

  4.   

    我做了怎么被gif格式的图片覆盖了
      

  5.   

    img_gif.FrameDimensionsList这里有错误
      

  6.   

    System.Drawing.Image img_gif = Image.FromFile("f:\\girl.gif");System.Drawing.Imaging.FrameDimension dimension = new System.Drawing.Imaging.FrameDimension(img_gif.FrameDimensionsList[0]);
    int iCount = img_gif.GetFrameCount(dimension);
    int iFrameIndex = 3;//你想看的某祯画面
    img_gif.SelectActiveFrame(dimension,iFrameIndex );
    img_gif.Save("f:\\aa1.jpg",System.Drawing.Imaging.ImageFormat.Jpeg);System.Drawing.Image img = new Bitmap("f:\\aa1.jpg");
    System.Drawing.Graphics gp = Graphics.FromImage(img);Font myFont = new Font("黑体",16,FontStyle.Bold);
    SolidBrush mySolidBrush = new SolidBrush(Color.Red);
    PointF myPointF = new PointF(50,160);
    gp.SmoothingMode = SmoothingMode.AntiAlias;
    gp.DrawString("MY IMAGE",myFont,mySolidBrush,myPointF);//img.Save(Response.OutputStream,ImageFormat.Gif);img.Save("f:\\girl_pic.jpg",System.Drawing.Imaging.ImageFormat.Jpeg);img_gif.FrameDimensionsList;
    gp.Dispose();
    img.Dispose();
    ----------------------------------------------------------------------
    出错行:img_gif.FrameDimensionsList;
    D:\wwwroot\Photo\WebForm1.aspx.cs(77): 只有 assignment、call、increment、decrement 和 new 对象表达式可用作语句