2010年12月10日

BitmapImage与byte[]相互转换

摘要: byte[]转换为BitmapImage:public static BitmapImage ByteArrayToBitmapImage(byte[] byteArray) { BitmapImage bmp = null; try { bmp = new BitmapImage(); bmp.BeginInit(); bmp.StreamSource = new MemoryStream(byteArray); bmp.EndInit(); } catch { bmp = null; } return bmp; }BitmapImage转换为byte[]:publ 阅读全文

posted @ 2010-12-10 16:33 chuncn 阅读(1071) 评论(0) 推荐(0) 编辑

导航