We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpVideo Capture,  Movie Playback,  Vision Libraries › Movie just from central pixels w/o compressing
Page Index Toggle Pages: 1
Movie just from central pixels w/o compressing? (Read 486 times)
Movie just from central pixels w/o compressing?
Sep 2nd, 2009, 7:04pm
 
Beginner question:
I have a video that only takes up part of the screen (50px wide); it's just taking the movie and compressing it horizontally.  Is there any way to have the same 50px-wide column, but using pixels from the center of the video, not just a compressed version of the whole width? Is it even possible?  Thanks!
(I figured it out with Capture using crop(), but not for .mov files)



Code: (using Capture, not Movie)

import processing.video.*;
Capture myVideo;
       
void setup(){
   size(320,240,P2D);
   myVideo = new Capture(this,50,height,15);
   }
   
void draw(){
       if(myVideo.available()) {
         myVideo.read();
   }
   
       image(myVideo,150,0);
     }
Page Index Toggle Pages: 1