title: Convert Image from Byte Array to Image from MS Access using C#
body: <p>Are there any way to convert Image which is stored in MS Access to byte array using C#? Currently, I have stored my Image into my database which is in byte array format. Now I want to use OleDbReader to read through my image as a byte array, but I dont know how to it. </p>
  
  <p>This is my Insert image into database code:</p>
  
  <pre><code>private byte[] ConvertToDBFormat(IImage InputImage)
      {
          Bitmap BmpImage = new Bitmap(InputImage.Bitmap);
          MemoryStream MyStream = new MemoryStream();
          BmpImage.Save(MyStream, System.Drawing.Imaging.ImageFormat.Jpeg);
          byte[] ImageAsBytes = MyStream.ToArray();
          return ImageAsBytes;
      }
  </code></pre>
  
  <p>This is my code where I want to read from the database as byte </p>
  
  <pre><code>byte[] buffer = (byte[])reader["FaceImage"];
  </code></pre>