How to map a point $(x,y)$ in $720\times1280$ rectangle to a point $(x_1,y_1)$ in a square $1080\times1080$?
I try with the following formula, but seems there's something wrong.
Let $y_{offset} = \frac{1280 - 720}{2}$. \begin{align} x_1 &= x \frac{1080}{720}\\ y_1 &= y \frac{1080}{720} - y_{offset} \end{align}
The above formula works if the square is $1440\times1440$ but $1080\times1080$.