title: Loading image in picturebox from database
body: <p>i've tried the following code for loading an image in picturebox from database. but everytime , i get an error like '<strong><code>paramater is  not valid</code></strong>'.</p>
  
  <pre><code>buttonSave()
              {
                  .......
                  .......
                  img = Image.FromFile(strFileName);
                  byte[] byteImg = ImageToByteArray(img);
                  objEmp.Picture = byteImg;
                  .......
                  .......
              } 
  
  public byte[] ImageToByteArray(Image img)
          {
              System.IO.MemoryStream ms = new System.IO.MemoryStream();
              img.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
              return ms.ToArray();
          }  
  
  Display()
         { 
             .......
             .......
             Byte[] bytePicData = (Byte[])dt.Rows[0]["PICTURE"];                
             MemoryStream stmPicData = new MemoryStream(bytePicData);
             PicBox.Image = Bitmap.FromStream(stmPicData);} 
             .......
             .......
        }
  </code></pre>