Image image= GetImageFromClipboard();//实现从剪切板获取图像的功能
System.IO.MemoryStream stream = new System.IO.MemoryStream();
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter formatter
= new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); formatter.Serialize(stream, image);
FileStream fs=new FileStream("xx",FileMode.Open,FileAccess.Write);
fs.Write(stream.ToArray(),0,stream.ToArray().Length);
您可能感兴趣的文章: