我的代码目前如下所示:
if (fe == "CR2")
{
Image img = null;
byte[] ba = File.ReadAllBytes(open.FileName);
using (Image raw = Image.FromStream(new MemoryStream(ba)))
{
img = raw;
}
Bitmap bm = new Bitmap(img);
pictureBox1.Image = bm;
statusl.Text = fe;
}
当我打开 RAW 图像时,程序停止并且 Visual Studio 说:
参数无效:Image raw = Image.FromStream(new MemoryStream(ba))
请帮忙!如何让 RAW 文件显示在 PictureBox 中?