“参数无效”Image.FromStream

时间:2012-06-20 19:02:35

标签: c#

我有一个Web服务,它将图像作为流返回。

public Stream GetImageStream()
{
    // Omitted code ...

    return httpResponse.GetResponseStream();
}

在另一个页面中,我使用此功能:

Image img = Image.FromStream(GetImageStream());

但执行此行时出现以下错误:

“参数无效”

另外,如何处理空流?

0 个答案:

没有答案
相关问题