无法在Image类中找到FromStream [英] Unable to locate FromStream in Image class

查看:112
本文介绍了无法在Image类中找到FromStream的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下代码:

Image tmpimg = null;
HttpWebRequest httpWebRequest = (HttpWebRequest)HttpWebRequest.Create(url);
HttpWebResponse httpWebReponse = (HttpWebResponse)httpWebRequest.GetResponse();
Stream stream = httpWebReponse.GetResponseStream();
return Image.FromStream(stream);

在最后一行中键入 Image。 FromStream 不在列表中。我该怎么办?

On the last line when I type in Image., FromStream isn't in the list. What can I do?

推荐答案

您可能需要使用System.Drawing; ;

You probably need using System.Drawing;.

这篇关于无法在Image类中找到FromStream的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆