我想获得图像尺寸(宽度和高度)
var source = "http://c.s-microsoft.com/en-us/CMSImages/mslogo.png?version=856673f8-e6be-0476-6669-d5bf2300391d";
WebClient client = new WebClient();
client.OpenRead(source);
答案 0 :(得分:0)
WebRequest request = WebRequest.Create(source);
WebResponse response = request.GetResponse();
Image image = Image.FromStream(response.GetResponseStream());