Accounts for resolutions where the height and width are not equal preventing the image from stretching.