You only need an image (bitmap, in this case), and not
PictureBox
, which is a control rendering the image, a purely redundant control which, by some reasons, is a source of enormous confusions for many inquirers of this forum.
var myBitmap = new Bitmap(openfd.FileName);
int width = myBitmap.Width;
int height = myBitmap.Height;
—SA