【发布时间】:2017-05-25 13:03:45
【问题描述】:
我正在从智能卡读取数据。 该数据还包含一张图片。 ReadData类中获取图片的代码:
public Bitmap GetPhotoFile()
{
byte[] photoFile = GetFile("photo_file");
Bitmap photo = new Bitmap(new MemoryStream(photoFile));
return photo;
}
xaml 中的代码:
imgphoto = ReadData.GetPhotoFile();
正在生成错误:
无法将类型“System.Drawing.Bitmap”隐式转换为“System.Windows.Controls.Image”
这方面最好的方法是什么?
【问题讨论】:
标签: wpf image bitmap type-conversion