title: c# How to convert pictureBox.Image to Byte Array?
body: <p>I looking for fast way Picturebox in image Convert to byte array.</p>
  
  <p>I saw this code but i don't need it. because Picture box of images is the data read from the db. 
  So I don't know ImageFormat</p>
  
  <pre><code>public byte[] imageToByteArray(System.Drawing.Image imageIn)
  {
      MemoryStream ms = new MemoryStream();
      imageIn.Save(ms, System.Drawing.Imaging.ImageFormat.Gif);
      return ms.ToArray();
  }
  </code></pre>
  
  <p>So Please let me know if anybody know fast way</p>
  
  <p>Thanks! have a good time!</p>