获取剪切板上DataFormats.Dib格式的文件

if (formats.Contains(System.Windows.Forms.DataFormats.Dib))
{
using (var img = System.Windows.Forms.Clipboard.GetImage())
{
string fileName = Guid.NewGuid().ToString("N") + ".png";
img.Save(fileName);
}
}

原文地址:https://www.cnblogs.com/sczmzx/p/8854321.html