rt

解决方案 »

  1.   

    pictureBox1.DataBindings.Add("Image", dataTable, "imgField");
    dataGrid1.DataSource = dataTable;
      

  2.   

    算了不问这个问题
    在这里问一个另外的问题吧
    怎么样把pictureBox的图像转换成byte[]
    我用了
    pictureBox29.Image.Save(ms,System.Drawing.Imaging.ImageFormat.Gif);
    imgCvt.ConvertTo((Image)pictureBox29.Image,typeof(byte[]));
    发生错误 GDI+ 中发生一般性错误。"
      

  3.   

    byte[] by=new Byte[600000];
    if(this.picture.Image!=null)
    {
    MemoryStream ms = new MemoryStream();
    this.picture.Image.Save(ms,ImageFormat.Jpeg);
    ms.Position = 0;
    by= ms.ToArray();
    ms.Close();
    }
    pictureBox的图像转换成byte[]
      

  4.   

    ImageConverter imgCvt = new ImageConverter();
    object obj = imgCvt.ConvertTo( img, typeof(Byte[]));
    byte[] byt = (Byte[])obj;