Image.FromStream( mStream )参数无效

tryhere 2005-07-02 05:22:20
mStream为System.IO.MemeroyStream,而FromStream要求System.IO.Stream类型,
出现了无效参数,怎么办?
...全文
976 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
tryhere 2005-07-02
  • 打赏
  • 举报
回复
解决了,
原来我在mStream中写数据时,写入了无效数据。
tryhere 2005-07-02
  • 打赏
  • 举报
回复
System.IO.MemoryStream mStream = new MemoryStream();
GetFileFromFTP( fileName,mStream );

mStream.Position = 0;
System.IO.Stream stream = (System.IO.Stream)mStream;
picPreView.Image = Image.FromStream( stream );
renyu732 2005-07-02
  • 打赏
  • 举报
回复
是不是没有定义什么的,可以贴你的代码出来看看

110,538

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧