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 & HelpPrograms › how to save an actual frame to the variable
Page Index Toggle Pages: 1
how to save an actual frame to the variable (Read 1052 times)
how to save an actual frame to the variable
Apr 15th, 2010, 7:14am
 
hello everybody
this is my first post.
I know , that i can save a actual frame to the file but i need save to the variable (PImage)

part of my code:
 void keyPressed() {
   if (key=='s') {
     save("fileName.jpg");
     PImage newImage = loadImage("fileName.jpg");
     ...
     ...some action with newImage....
  }
 }

 Do you know the better solution?

best regards
sebastian
Re: how to save an actual frame to the variable
Reply #1 - Apr 15th, 2010, 7:23am
 
You can get it to a PImage by simply doing:

PImage i=get();
Re: how to save an actual frame to the variable
Reply #2 - Apr 15th, 2010, 10:41am
 
This Topic was moved here from OpenGL and 3D Libraries by antiplastik.
Re: how to save an actual frame to the variable
Reply #3 - Apr 15th, 2010, 2:49pm
 
Thank you! It is really simple.
best regards
sebastian
Page Index Toggle Pages: 1