Loading...
Logo
Processing Forum
Hi,
I'm drawing on a PGraphics object with transparent background. I want to copy it to a PImage (will be tinted afterwards), and keep the transparency. It works when I save my PGraphics object to a png and load this file to a PImage.

I'd like to find a way to do the same without saving. I tried PGraphics.get(), but it doesn't keep alpha values. How should I do?

Thanks for answering.

Replies(2)

See if you can find an answer in the PGraphicsJava2D, createGraphics and transparency thread.
Thanks PhiLho,

I sorted it out, but I had to use a mask... I'm a bit lost with PGraphics/PImage subtleties.
Here is the result:
http://www.openprocessing.org/sketch/65607