title: Best way to send image data to a server using WebClient
body: <p>I'm using Webclient to try and send my image I've got on my winform application to a central server. However I've never used WebClient before and I'm pretty sure what I'm doing is wrong. </p>
  
  <p>First of all, I'm storing and displaying my image on my form like so: </p>
  
  <pre><code>_screenCap = new ScreenCapture();
  _screenCap.OnUpdateStatus += _screen_CapOnUpdateStatus;
  capturedImage = imjObj;
  imagePreview.Image = capturedImage;
  </code></pre>
  
  <p>I've set up an event manager to update my imagePreview image when ever I take a screenshot. Then displaying it when ever the status changes like this:</p>
  
  <pre><code>private void _screen_CapOnUpdateStatus(object sender, ProgressEventArgs e)
  {  
    imagePreview.Image = e.CapturedImage;
  }
  </code></pre>
  
  <p>With this image I'm trying to pass it to my server like so:</p>
  
  <pre><code>using (var wc = new WebClient())
  {
      wc.UploadData("http://filelocation.com/uploadimage.html", "POST", imagePreview.Image);
   }
  </code></pre>
  
  <p>I know I should convert the image to a byte[] but I've no idea how to do that. Could someone please point me in the right direction of go about doing this properly? </p>