given an original width, height, and a max width and height, scale to the maximum size while maintaining original ratio