Yes by changing the image dimensions you’re only setting a ratio, like 16x9 , 4x3 ect…
By that I mean, if you’ve got a 1024x1024 image, doubling the resolution (2048x2048) will not display a wider image, it’s exactly the same as the first one, but with a bigger resolution.
Once you’ve got your ratio, you can frame the image, either by moving the camera, or changing it’s focal length :