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