How to convert byte array to image and display in

2020-02-15 03:47发布

I have made a sql database using sql server. This database include images. When I display this database in a datagrid, byte[]array displays in the image column. How do I convert from a byte array back to an image and then display that image in the datagrid? Any help or tutorials are appreciated. thanks

标签: c#
2条回答
乱世女痞
2楼-- · 2020-02-15 04:28

Try

 MemoryStream ms = new MemoryStream(imageBytes);
 Image image= Image.FromStream(ms);
查看更多
登录 后发表回答