Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

creating a capture button

$
0
0
I've got a webcam sketch, but I was wanting to make a mouse click save the image from the webcam, any help would be appreciated. I've shown my sketch bellow in case its not a good starting point.
Thanks

import processing.video.*;
 
int w = 640;  
int h = 480; 
int fps = 25;  
Capture cam;  
 
void setup()
{
  size(w, h, P3D);  
   
  frameRate(fps);    
   
  cam = new Capture(this, w, h);  
}
 
void draw()
{
  if (cam.available() == true) {  
      cam.read();                  
  }
   
  image(cam, 0, 0, w, h); 
  tint(17);             
  noTint();                                                    
}

Viewing all articles
Browse latest Browse all 1768

Trending Articles