I am able to display the picture in the picture box without checking the file size by the following code:
private void button3_Click_1(object sender, EventAr
The Bitmap will hold the height and width of the image.
Use the FileInfo Length
property to get the file size.
FileInfo file = new FileInfo(open.FileName);
var sizeInBytes = file.Length;
Bitmap img = new Bitmap(open.FileName);
var imageHeight = img.Height;
var imageWidth = img.Width;
pictureBox2.Image = img;