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
copy pixels from camera (Read 1068 times)
copy pixels from camera
Aug 9th, 2005, 11:48am
 
what is the fastest way to copy pixels data from camera to PImage object?

i'm using now

arraycopy(camera.pixels, images[shift].pixels);
images[shift].updatePixels();

maybe there is fastest solution?




Re: copy pixels from camera
Reply #1 - Aug 10th, 2005, 5:59am
 
depends on what you're trying to do. the camera itself is a PImage object so if all you want to do is draw it to the screen, then you can use image(camera, x, y) to do so.  

if you're trying to mess with the pixels first, the code you listed is your fastest solution, but you should probably be using P3D because the default renderer will be slow with pixel heavy stuff like camera.
Page Index Toggle Pages: 1