wpf 获取Image的图片并保存到本地
var encoder = new PngBitmapEncoder ();
encoder.Frames.Add (BitmapFrame.Create((BitmapSource)image.Source));
FileStream file = new FileStream ("../../102.png",FileMode.Create);
encoder.Save (file);
file.Close ();
注:FileStream如果没有Close关闭,那么就会写入文件失败,图片0kb,也不能正常显示图片。