FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Suggestions
   Software Suggestions
(Moderator: fry)
   screengrab
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: screengrab  (Read 609 times)
benelek

35160983516098 WWW Email
screengrab
« on: Feb 23rd, 2003, 7:51am »

right now, the only way to get a screengrab generated by ur sketch is to do it while running it within P5. because of java's insecurities, it can't be done from an applet.
 
so if i want to get screenshots generated after an hour or 2 of running the sketch, it has to be done while P5 is running, thus preventing me from writing anything else in those 2 hrs.
 
for this reason, im wondering if the "export application" function is coming soon, and sending out a humble plea that it will be able to output screengrabs.
 
-jacob
 
gkoshra

WWW Email
Re: screengrab
« Reply #1 on: Feb 24th, 2003, 1:02pm »

I don't know if it differs from os to os, but I can open a couple of proce55ings, one can be running a sketch for a while, and I can code away in another session, and test the sketch without interfering with the other one. I am running win2000.
 
benelek

35160983516098 WWW Email
Re: screengrab
« Reply #2 on: Feb 25th, 2003, 4:07am »

ahh, but these days P5 is a beast in terms of memory usage. right now i have open an extremely small sketch, and already Processing is using 25 megabytes. sometimes it gets up to 60mb...
 
i'm running win2k as well.
 
Glen Murphy

WWW Email
Re: screengrab
« Reply #3 on: Feb 25th, 2003, 4:31am »

Quote:
but these days P5 is a beast in terms of memory usage

 
Would you prefer manual garbage collection?
 
benelek

35160983516098 WWW Email
Re: screengrab
« Reply #4 on: Feb 25th, 2003, 8:11am »

lol, i'm not complaining about P5 - just the fact that i can't use some code outside of it
 
btw, does java allow an applet to write to a file on the server (any file)?
 
-jacob
 
fry


WWW
Re: screengrab
« Reply #5 on: Feb 25th, 2003, 9:09pm »

an undocumented feature.. applications already sort-of work..
 
first export to applet, then cd to the applet directory and type:
 
java -cp yoursketchname.jar BApplet yoursketchname
 
or just
 
java -cp yoursketchname.jar yoursketchname yoursketchname
 
that'll open the thing as a separate java app, independent of p5. double-clickable jar files will prolly happen sometime soon too. this also requires you to have the jre installed and in your path. (should just work on the mac, windows users will need to install their own jre unless they want to point to the jre included in the standard download).
 
benelek

35160983516098 WWW Email
Re: screengrab
« Reply #6 on: Feb 26th, 2003, 9:55am »

i got the following error trying to open an exported applet through the DOS prompt. the image in question does exist, and the applet works fine when opened using IE:
 
Uncaught error fetching image:
java.lang.NullPointerException
   at sun.awt.image.URLImageSource.getConnection(Unknown Source)
   at sun.awt.image.URLImageSource.getDecoder(Unknown Source)
   at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
   at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
   at sun.awt.image.ImageFetcher.run(Unknown Source)
 
-jacob
 
benelek

35160983516098 WWW Email
Re: screengrab
« Reply #7 on: Feb 26th, 2003, 9:58am »

tho i tried another applet (one that didnt need an image), and it worked fine
 
i guess this's what "sort-of" means, hehe...
 
-jacob
 
fry


WWW
Re: screengrab
« Reply #8 on: Feb 26th, 2003, 2:37pm »

on Feb 26th, 2003, 9:58am, benelek wrote:
i guess this's what "sort-of" means, hehe...

 
yeah, this is why features take a while, trying to test them in all sorts of cases (with/without images or data files, etc..)
 
you might try copying the image from 'data' to the same folder as the dos prompt you're running from, it may not be finding it in the .jar file.
 
benelek

35160983516098 WWW Email
Re: screengrab
« Reply #9 on: Feb 27th, 2003, 12:41pm »

nah, it was there in the same folder as the exported applet (sitting right next to the jar file).
 
Pages: 1 

« Previous topic | Next topic »