c# byte array to image conversation for earlier frameworks?(win CE)

c# byte array to image conversation for earlier frameworks?(win CE)

我想将字节数组转换为图像,正如我在标题和 我试过了,

byte[] data = (byte[]) dt.Rows[0]["IMAGE"];
MemoryStream ms = new MemoryStream(data);
pictureBox1.Image = Image.FromStream(ms);

但我正在为 Win CE OS 开发框架 3.5 compact。它给出了错误 "Image.FromStream" 编译器说;

错误 2 'System.Drawing.Bitmap' 不包含 'FromStream' C:\Users....\Fonksiyonlar.cs 93 75 Terminal

的定义

你能提供任何其他方法吗?

我这里没有Windows CE,不过我相信你可以试试:

pictureBox1.Image = new Bitmap(ms);