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.
Page Index Toggle Pages: 1
Yet another JMyron scaling problem (Read 327 times)
Yet another JMyron scaling problem
Nov 8th, 2008, 7:47pm
 
Hi,

I want to change the resolution of what I'm getting from JMyron ie. rather than painting the canvas with an image of 320*240 as is the default i want to paint it with an image at 640*480 or other. I tried getting the input on to a PImage and then stretching the PImage across the canvas but all i get is a blank canvas, any thoughts?
Re: Yet another JMyron scaling problem
Reply #1 - Nov 23rd, 2008, 5:07am
 
Code:

import processing.opengl.*;
import JMyron.*;
PImage i;
JMyron m;

void setup(){
size(1024,768,OPENGL);
m = new JMyron();
m.start(320,240);
frameRate(30);
i = createImage(320,240,ARGB);
}

void draw(){
m.update();
m.imageCopy(i.pixels);
i.updatePixels();
image(i, 0, 0,width,height);
}

public void stop(){
m.stop();
super.stop();
}

Page Index Toggle Pages: 1