简体   繁体   中英

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

I want to convert byte array to image as I say on title and I tried this,

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

but I m working on framework 3.5 compact for Win CE OS. and it gives error for "Image.FromStream" Compiler says;

Error 2 'System.Drawing.Bitmap' does not contain a definition for 'FromStream' C:\\Users....\\Fonksiyonlar.cs 93 75 Terminal

Can you offer any other way to do this?

我这里没有Windows CE,但我相信您可以尝试:

pictureBox1.Image = new Bitmap(ms);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM