实现从剪切板获取图像的功能

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);

原文地址:https://www.cnblogs.com/cwfsoft/p/1758095.html