jit.rota : centering the zoom ????

tep's icon

Ok i suppose it's very easy.

I want to do this : selecting a zone in a video by clicking it, i want to zoom considering the click point as the CENTER of my zone.
So, my weak sense of logic would be :
- calculate the size of zoomed screen related to zoom (resolution / zoom) for x / y
- to get the center point, substract 1/2 of that new x value and add 1/2 of the y value

Result : no. not at all. try again....

Max Patch
Copy patch and select New From Clipboard in Max.

???

Christopher Dobrian's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Here's an example of centering the zoomed image. Adjust as needed to center around your mouse click.

encoder audio's icon

A pretty old thread, but I've just had the same question :D
My further question would be, that keeping the center-zoom feature, can you also move the image to left and right somehow?
I've tried to do it with the offsets, but it did not work :(

Pedro Santos's icon

Hi! Change the position first, then use jit.rota to do the rotation, scaling, etc.

Max Patch
Copy patch and select New From Clipboard in Max.