Getting dimensions of image from string data

Hi

If I put an image into a picturebox, and the image is smaller than the picturebox dimensions, the image logically gets put at the top left.

Is there a way of getting the image dimensions from the string variable before putting the image into the picturebox?

This looks like it could work: