更新时 GDI+ 中出现一般性错误

A generic error occurred in GDI+ when update

当我更新表单时,只有当我不更新(更改)图像时才会出现此错误。
当我使用新图像更新时,我没有出现此错误。

Try
    Dim mstream As New System.IO.MemoryStream()
    PictureBox1.Image = New Bitmap(Image.FromStream(mstream))
    Dim arrImage() As Byte = mstream.GetBuffer()
    mstream.Close()

    MysqlConn.Close()
    MysqlConn.Open()
    COMMAND.Connection = MysqlConn
    COMMAND.CommandText = "update product set 
        id_maker=@Value1, 
        foto=@foto  
        where id = '" & TextBox1.Text & "'"
    COMMAND.Parameters.AddWithValue("@Value1", If(String.IsNullOrEmpty(ComboBox1.Text), DBNull.Value, ComboBox1.Text))

    COMMAND.Parameters.AddWithValue("@foto", arrImage)
    READER = COMMAND.ExecuteReader
    MessageBox.Show("Datos Guardados")
    MysqlConn.Close()
Catch ex As Exception
    MessageBox.Show(ex.Message)
Finally
    MysqlConn.Dispose()
End Try
MysqlConn.Close()

我试试这个并工作。

Dim mstream As New System.IO.MemoryStream()
                'PictureBox1.Image = New Bitmap(Image.FromStream(mstream))
                PictureBox1.Image.Save(mstream, System.Drawing.Imaging.ImageFormat.Jpeg)
                Dim arrImage() As Byte = mstream.GetBuffer()