我正在尝试将位图图像保存到数据库
Bitmap map = new Bitmap(pictureBoxMetroMap.Size.Width, pictureBoxMetroMap.Size.Height);
我imgcontent在数据库中创建了具有数据类型的列,binary但我的问题是如何将其bitmap(映射)转换为二进制数据?
以及如何从数据库检索数据?
我用谷歌搜索,发现了类似的东西,但是没有用:
byte[] arr;
ImageConverter converter = new ImageConverter();
arr = (byte[])converter.ConvertTo(map, typeof(byte[]));
慕沐林林
相关分类