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 › Re: Question about pgraphics, transparency, png et
Page Index Toggle Pages: 1
Re: Question about pgraphics, transparency, png et (Read 391 times)
Re: Question about pgraphics, transparency, png et
Mar 12th, 2009, 12:58pm
 
First, I don't see where pg is defined... I suppose it have been forgotten in the paste, so that's not a problem.

Next:
1) Remove pg.background(0,0); Although it should be transparent, it probably make the "ugly background matte". New PGraphics has a natural transparent background.

2) You use save() where you probably want saveFrame().
Re: Question about pgraphics, transparency, png et
Reply #1 - Mar 16th, 2009, 10:16am
 
I forgot one point (which I wrote in two other threads with similar problem): apparently, the transparent background of a PGraphics is maintained (when saving) only in Java2D mode.

For what I know (without checking code), save and saveFrame probably use the same code, the only difference is (should be) the parsing of the name to increment a counter).
Page Index Toggle Pages: 1