Load Picturebox Image From Memory?

后端 未结 3 819
难免孤独
难免孤独 2020-12-20 13:08

I can\'t seem to figure out how to load a pictureBox image from a bitmap in memory. Is it possible or do I have to create temp file for the bitmap?

3条回答
  •  青春惊慌失措
    2020-12-20 13:42

    You can create a Bitmap from a MemoryStream:

    pictureBox.Image = new Bitmap(new MemoryStream(byteArray));
    

提交回复
热议问题