将System.Drawing.Bitmap转换成System.Drawing.Imaging.BitmapSource
public static BitmapSource ToBitmapSource(Bitmap bitmap)
{
MemoryStream ms = new MemoryStream();
bitmap.Save(ms, ImageFormat.Png);
ms.Position = 0;
BitmapImage bi = new BitmapImage();
原创
2012-02-29 08:44:55 ·
2918 阅读 ·
0 评论