从 webClient 响应中获取图像宽度和高度
get image width and height from webClient response
我想获取图像尺寸(宽度和高度)
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);
WebRequest request = WebRequest.Create(source);
WebResponse response = request.GetResponse();
Image image = Image.FromStream(response.GetResponseStream());
我想获取图像尺寸(宽度和高度)
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);
WebRequest request = WebRequest.Create(source);
WebResponse response = request.GetResponse();
Image image = Image.FromStream(response.GetResponseStream());