title: Parameter is not valid while trying to covnert byte array to image
body: <p>I have a program, which takes data from xlsx file and put them to dataGridView. Then I'm trying to convert this data(from dataGridView) to byte array for later place it to PictureBox, from Bitmap.
  So I have datagridView(object) -> byte array - > Bitmap -> Picture.</p>
  
  <p>And problem is occur, on the step, where I'm trin convert byte array to Image.</p>
  
  <p>I've tried as many ways to fix it, as I could find in the Internet(especially modifications of MemoryStream and ImageConverter), but noone didn't help.  Debuger Says that data is ok(pic below). May be there is another way to convert it to image?</p>
  
  <p>This is my dataGridView<br>
  <img src="https://i.stack.imgur.com/3A3Ho.png" alt="This is my dataGridView"></p>
  
  <p>data from my array<br>
  <img src="https://i.stack.imgur.com/hXEXN.png" alt="data from my array"></p>
  
  <pre><code>    private void buttonShowImage_Click(object sender, EventArgs e)
      {
  
          int size = (dataGridView1.RowCount) * (dataGridView1.ColumnCount-1);
          byte[] arrOfValues = new byte[size];
          PictureBox picBox = new PictureBox();
  
  
          int k = 0;
          for(int i = 0; i &lt; dataGridView1.Rows.Count; i++)
          {
              for (int j = 0; j &lt; dataGridView1.Columns.Count - 1; j++)
              {
                  arrOfValues[k++] = Convert.ToByte(dataGridView1[i, j].Value);
              }
  
          }
  
          ImageConverter ic = new ImageConverter();
  
          Image img = (Image)ic.ConvertFrom(arrOfValues);  // here is the problem 'data is not valid' 
  
          Bitmap bmp = new Bitmap(img);
  
          picBox.SizeMode = PictureBoxSizeMode.Zoom;
  
          picBox.Image = bmp;
  
  
          picBox.Show();
  
      }
  </code></pre>