日期:2014-05-18  浏览次数:20938 次

数组如何存储图片?如何循环显示出来
数组如何存储图片?如何循环显示出来

------解决方案--------------------

C# code
            byte[] picbyte;  //图片保存在数组中?
            Stream ms;
            OpenFileDialog ofdSelectPic = new OpenFileDialog();
            ofdSelectPic.ShowDialog();
            ms = ofdSelectPic.OpenFile();
            picbyte = new byte[ms.Length];
            ms.Position = 0;
            ms.Read(picbyte, 0, Convert.ToInt32(ms.Length));

------解决方案--------------------
探讨

C# codebyte[] picbyte;//图片保存在数组中?Stream ms;
OpenFileDialog ofdSelectPic=newOpenFileDialog();
ofdSelectPic.ShowDialog();
ms=ofdSelectPic.OpenFile();
picbyte=newbyte[ms.Length];
ms.Position=0;
ms.Read(picbyte,0, Convert.ToInt32(ms.Length));

C# codeMemoryStream ms=newMemoryStream(picbyte);
Image image=I…