Create PImage with transparent pixels

edited October 2013 in How To...

Hi!

I think this is a question that was already asked, for example here in an old forum:

http://processing.org/discourse/beta/num_1270824860.html

But it doesn't work. I need some pixels to be transparent and also tried to color them as "color(255,0)" but doesn't work either.

Any ideas?

Thanks for your help!

Tagged:

Answers

  • Why don't you post your attempt here? [-(

  • The PImage needs to be in ARGB than you can try image.pixels[x+y*image.width]&=0x00FFFFFF

  • Answer ✓

    Or you create a PGraphics, allowing you to draw on it: it will be transparent on the parts not drawn on.

    A PGraphics is a PImage with drawing capabilities.

Sign In or Register to comment.