Make the image as large as possible, while maintaining the aspect ratio and keeping the height and width less than or equal to the given height and width.