Suppose a image has

Height = 200px;
Width = 100px; 

A point in that image which has

Y axis = 40px
X axis = 30px

Now if I resize that image:

New Height = 300px;
New Width = 150px;

Is there any formula to calculate new Y and X axis of that point?


1 Answer 1


Provided that the stretch is simply linear and consistent across the image, then the displacement of the point is proportional to the magnification factor.

For the X-Axis:

  • At $100px$ width, the point was at $30$
  • At $150px$ width, where would the point be? (Let's call this our unknown $x$).

$$x=\frac{150}{100} \times 30 = 45$$

Similarly, for the Y-Axis, the point will now be at $60$.

Hope this helps.


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.