David Liao

为家人活得更好而奋斗!

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

bute[] 转stream


byte[] bPhoto = yourBytes;
if(bPhoto!=null)
{
//Read data
MemoryStream stream=new MemoryStream(bPhoto,true);
stream.Read(bPhoto,
0,bPhoto.Length);

// Create a bitmap from the stream
Bitmap bmp = new Bitmap(stream);

// Close the stream
stream.Close();

return bmp;
}

else
return null;
posted on 2006-12-15 10:01  David Liao  阅读(168)  评论(0)    收藏  举报