I need to resize a picture to a fixed size. But it has to keep the factors between the width and height.
Say I want to resize a picture from 238 (w) X 182 (h) to 210 / 150
What I do now is:
Original width / target width = 1.333333
Original Height / target Height = 1.213333
Now I take the smallest factor.
Now I always have the right width since 238 / 1.333333 = 210.
But the height is still 160.
How do I get the height down to 160 without ruining the pic?
Do I need to crop? If so how?