728x90
728x170
public static System.Drawing.Image Convert(System.Windows.Media.ImageSource image)
{
    if (image == null) return null;
    
    MemoryStream memoryStream = new MemoryStream();
    System.Windows.Media.Imaging.BmpBitmapEncoder bmpBitmapEncoder = new System.Windows.Media.Imaging.BmpBitmapEncoder();
    bmpBitmapEncoder.Frames.Add(System.Windows.Media.Imaging.BitmapFrame.Create((System.Windows.Media.Imaging.BitmapSource)image));
    encoder.Save(memoryStream);
    
    return System.Drawing.Image.FromStream(memoryStream);
}
728x90
그리드형
Posted by kjun.kr
,