问题描述
我正在尝试将位图图像(几个小图像)加载到数据表 (C#) 中的一列。
我已将新列创建为 [1]:Table.Columns.Add("Level",typeof(System.Byte[]));
我也试过 [2]:Table.Columns.Add("Level",typeof(System.Drawing.Bitmap));
并且我在运行时将图像提取为:frmBitmap.DefInstance.imgDynamic.Images[sBitmap]
其中 sBitmap 是一些字符串,它从 'imgDynamic' ImageList 中提取特定图像。图片类型为:System.Drawing.Bitmap
但是当我将此图像(即 frmBitmap.DefInstance.imgDynamic.Images[sBitmap]
分配给列字段)时,我看不到该图像,而是将 'System.Byte[]' 作为输出。
我试过设置为:
var imageConverter = new ImageConverter();
Table.Rows["Level"] = imageConverter.ConvertTo(frmBitmap.DefInstance.imgDynamic.Images[sBitmap],System.Type.GetType("System.Byte[]"));
我的问题是:我们如何在 C# 数据表的列中加载 BITMAP 图像?????
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)