Mobile app version of vmapp.org
Login or Join
Ravi4787994

: Stretch whole Image to have inner section be a specific dimension I have an image. Below is a small representation of the real image's layout. The dimenstions of my image are 600px × 449px,

@Ravi4787994

Posted in: #Resize

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.



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.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Ravi4787994

1 Comments

Sorted by latest first Latest Oldest Best

 

@Cody3331749

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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme