title: vb.net How to display an 8 bit image in a picture box from a byte array
body: <p>I have a single array containing the image data acquired from a camera.
  The array contains only the 8 bit data relating to each pixel. currently I perform the following to display the image on the picturebox:</p>
  
  <pre><code>    Dim bm As New Bitmap(CInt(width), CInt(height))
      Dim bufcnt As Integer = 0
      Dim mrow As Integer
      Dim mcol As Integer
      For mrow = 0 To height - 1
          For mcol = 0 To width - 1
              bm.SetPixel(mcol, mrow, Color.FromArgb(imageBuffer(bufcnt), imageBuffer(bufcnt), imageBuffer(bufcnt)))
              bufcnt = bufcnt + 1
          Next mcol
      Next mrow
      PCBIMG.Image = bm
  </code></pre>
  
  <p>However, on larger images this does take some time, is there a more efficient way of doing this that allows for realtime display of the image?</p>