I am loading multiple images into a picturebox one at a time. Each time the image is loaded in using code like this:
pBox1.Size = new System.Drawing.Size(450, 450);
pBox1.SizeMode = PictureBoxSizeMode.CenterImage;
pBox1.BorderStyle = BorderStyle.Fixed3D;
pBox1.SizeMode = PictureBoxSizeMode.StretchImage;
pBox1.Image = (Image)image;
pBox1.Refresh();
Most images that have the same height as width show up fine, however images that have different heights and weights are skewed. How would I handle images like this to show up correctly?
You probably want to use
ZoomforPictureBoxSizeMode. That will uniformly stretch the image: