I have an image. Below is a small representation of the real image's layout. The dimenstions of my image are 600px × 449px, and The dimensions for the inner secion of my image are 541px × 341px.

The layout of my image

I want the dimensions for the inner section of my image to be 320px × 240px. I want to know how much I would have to shrink the whole image, both width and height (aspect ratio is not important) in order to make the inner section have the dimensions of 320px × 240px.

I would be grateful if you could tell me how to calculate this and/or calculate it yourself as well as tell me how much to shrink the width, and how much to shrink the height.

1 Answer 1


320 / 541 = .591 (that is, 320 pixels is 59.1% of 541 pixels)

600 * .591 = 354.6 (so 354.6 is 59.1% of 600)

rounded up to 355 pixels

There's your width; do the same calculations for the height.

//edit for height:

240 / 341 = .704 449 * .704 = 316.1

round down to 316px

  • +1 Excellent, thank you! I now see how this works! I also realized that @jhocking's answer was a little off, but I will still accept the answer because @Max corrected it and provided calculations for the height as well. Thanks Max! Jun 3, 2011 at 23:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.