title: Cannot implicitly convert type 'System.Drawing.Image' to 'System.Drawing.Bitmap'`
body: <p>Declared a bitmap which was</p>
  
  <pre><code>private Bitmap img1 = null;  
  private Bitmap img2 = null;  
  </code></pre>
  
  <p>the image will be putted after selecting it from <strong>openFileDialog</strong>.<br>
  the selected images were placed in an array.</p>
  
  <pre><code>imgName = openFD.FileNames;
  </code></pre>
  
  <p>then button1 to display these image.</p>
  
  <pre><code>pictureBox1.Image = Image.FromFile(imgName[0]);  
  pictureBox2.Image = Image.FromFile(imgName[1]);
  </code></pre>
  
  <p>i replaced the button1 code with this</p>
  
  <pre><code>img1 = Image.FromFile(imgName[0]);  
  img2 = Image.FromFile(imgName[1]);
  </code></pre>
  
  <p>but an error occurs  </p>
  
  <blockquote>
    <p>Cannot implicitly convert type 'System.Drawing.Image' to 'System.Drawing.Bitmap'</p>
  </blockquote>
  
  <p>I'd try to change the code to <code>img1 = Bitmap.FromFile(imgName[0]);</code>. but still has the same error.<br>
  Any suggestion how to correct or do this right?</p>