I'm trying to make some web app, that user can upload is face, then rotate the image in some frame with empty place for the image - (example - http://is2.mzstatic.com/image/thumb/Purple71/v4/80/50/f4/8050f498-e330-5205-9999-9b9f9a3da818/source/175x175bb.jpg)
My problem is, when the user rotate the image with transform: rotate(Xdeg), the image rotating from the center, but in PHP when I rotate the image with the same degrees, it moving from x/y that I mention
First I rotate the image, than I copy it to the big image. the given x,y values can't match to every rotation.
My question is - how can I fix the change and build some formula that make the x,y in the center of the empty round of face, even after the rotation
Thanks