crop and rotate


    Apr 12 2006 | 3:32 am
    Someone please help me - my Jitter is rusty and I'm trying to do something that for the life of me I can't seem to get to work. I'm trying to arbitrarily crop images on the fly, then rotate and scale only the cropped portion using jot.rota, filling the rest of the window with black (or folded or wrapped versions of the cropped image). I've tried cropping by sending the same srcrect and dstrect params to jit.qt but when I then send the video to jit.rota it scales and rotates the original 320x240 shape, including the cropped black parts. I tried jit.submatrix and that did the scaling and rotating as I wanted but the image is chewed up. anyone? thanks,-bob

    • Apr 12 2006 | 3:49 am
      are you setting @usersrcdim 1 with jit.matrix, otherwise sending srcdimstart/srcdimend wont work. I imagine that would be the preferred way to do it though.
      v a d e //
      www.vade.info abstrakt.vade.info
    • Apr 12 2006 | 12:14 pm
      Hi Vade, Thanks for the response but thats not the problem - I am setting @usersrcdim 1 and the matrix *is* cropping properly. The problem is that when I then send the stream to jit.rota and scale and rotate, I can't fill the screen with rotated/scaled versions of the cropped area. What is rotated and scaled is the "full" 320x240 image including the black boxes around the cropped area. SoftVNS has an actual crop object and when I use that (instead of using a Jitter option) and send that stream to the softVNS rotate object the image scales and rotates within the cropped rectangle - ie the corners get clipped when the image is rotated slightly. The cropped area is like a window that the image scales and rotates within - I want it to use the whole 320x240 space.
    • Apr 12 2006 | 12:29 pm
      could you post a patch to the list? there may be an error you aren't noticing and that we might catch.
      best, jonathan
    • Apr 12 2006 | 1:07 pm
      look at the boundmode attributes in jit.rota. 2 and 4 may be what youre looking for.
    • Apr 12 2006 | 4:57 pm
      Here's a simplified version of the patch.
    • Apr 12 2006 | 5:14 pm
      Bob,
      You need to keep your dstrect dimensions at 0 0 320 240.
      Adam
    • Apr 12 2006 | 5:20 pm
      Sorry, that last post wasn't right.
      Adam
    • Apr 13 2006 | 3:45 am
      try jit.submatrix :
    • Jul 23 2015 | 3:44 pm
      Can someone please help me. I need to crop a video file without distorting the image. It seem like the options suggested above don't actually crop the edges of a image, but instead, warp it by making it either larger or smaller. I spent hours trying to figure this out, please help.
    • Jul 23 2015 | 7:13 pm
      Jitter tutorial 14 has everything you need.