title: Calculating image sizes
body: <p>Basically, I have an image which could be large (couple of thousand pixels in both height and width), and can vary quite a bit in width's and height's.</p>
  
  <p>What I need to do is display these images at approximately 500 pixels in height and width - but I want to keep the aspect ratio of these intact, so the values would just be fairly close. But I'm a bit confused on what calculations I could use on the original width's and heights to get them to the right figures.</p>
  
  <p>Any ideas?</p>