如何字节数组转换为图像并显示在数据网格? [英] How to convert byte array to image and display in datagrid?
本文介绍了如何字节数组转换为图像并显示在数据网格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经使用SQL Server SQL数据库。该数据库包括图像。当我在DataGrid中显示该数据库,byte []数组显示在图像列。如何从一个字节数组转换回的图像,然后显示在DataGrid中的形象?任何帮助或教程赞赏。谢谢
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
推荐答案
尝试
MemoryStream ms = new MemoryStream(imageBytes);
Image image= Image.FromStream(ms);
这篇关于如何字节数组转换为图像并显示在数据网格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文