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 & HelpSyntax Questions › running from the command line
Page Index Toggle Pages: 1
running from the command line (Read 322 times)
running from the command line
Feb 25th, 2009, 10:28pm
 
Hello,

I'm using Processing to plot thousands of data files as polygons and export them as image files.

-I'd like to run this code from a shell script. How can I do that?
-Also, can I use PImage to put the polygons on a transparent background?

Thanks.
Re: running from the command line
Reply #1 - Feb 25th, 2009, 11:05pm
 
if you export as an applet or as an application (which i haven't tested) you can just run it using

java -jar name.jar

like you would any other java program.

there's something on the wen site that says you can't compile from the command line. but there is a bug raised for it.
Re: running from the command line
Reply #2 - Feb 26th, 2009, 7:22am
 
pogopogo wrote on Feb 25th, 2009, 10:28pm:
can I use PImage to put the polygons on a transparent background

Yes. More exactly, by using a PGraphics.
Re: running from the command line
Reply #3 - Feb 26th, 2009, 4:04pm
 
Thanks!

...What's the advantage of PGraphics over PImage?
Re: running from the command line
Reply #4 - Feb 26th, 2009, 5:12pm
 
Also, I see that to *save* an image file that contains transparency, I need to use PGraphics. Can I still use mask to make the transparency? I guess I'm confused because I don't really understand how classes work...
Re: running from the command line
Reply #5 - Feb 26th, 2009, 6:36pm
 
PGraphics is a PImage, actually, but it is this class that have the graphic functions (line, rect, etc.). Functions of PImage can be used on PGraphics too.
Page Index Toggle Pages: 1