`
java-mans
  • 浏览: 11455495 次
文章分类
社区版块
存档分类
最新评论

空闲时间写一个图片二进制和图片相互转换的函数

 
阅读更多
FileStream fs = new FileStream(@"F:\收藏的一些图片\1_uncarman.jpg.gif", FileMode.Open, FileAccess.Read);
Byte[] btye = new byte[fs.Length];
fs.Read(btye, 0, Convert.ToInt32(fs.Length));
System.IO.MemoryStream imagememorystream = new MemoryStream(btye);
Image i = Image.FromStream(imagememorystream);
this.pictureBox1.Width = i.Width;
this.pictureBox1.Height = i.Height;
this.pictureBox1.Image = i;



写的一个图片和二进制之间进行转换的函数 图片大概只有七十多K但是计算机要把二进制连接起来的时候要运算很长时间 性能不好


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics