|
前面加个 (byte []) 就好了,比如你已经获得了一个DATASET
byte[] bytes = (byte[])ds.Tables[0].Rows[j];
if(bytes.Length > 0)
{
MemoryStream memStream=new MemoryStream(bytes);
try
{
Bitmap MyImage = new Bitmap(memStream);
this.pictureBox1.Image= MyImage;
}
catch
{
MessageBox.Show("读取数据库中的图像信息失败!");
this.pictureBox1.Image=null;
}
} |
|