C#中将图片文件存至数组

String SourceLoc  = "D:/Images/photo.jpg";
String DestinationLoc 
= "D:/Images/TestImage.jpg";

FileStream fs 
= new FileStream(SourceLoc, FileMode.Open,FileAccess.Read);
byte[] ImageData = new byte[fs.Length];
fs.Read(ImageData,
0,System.Convert.ToInt32(fs.Length));
fs.Close();

posted on 2006-07-25 15:33  龙少爷  阅读(1067)  评论(0编辑  收藏  举报

导航