title: How to calculate a proportional size for a given image with not to exceed
body: <p>I have an area to display an image that has a max size of 240x180</p>
  
  <p>If I have an image of 400x423 how can I calculate a new width and height for that image that best fits into my 240x180 box?  (In this case it would be 170x180)</p>