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.
Page Index Toggle Pages: 1
Transparent PNG (Read 1236 times)
Transparent PNG
Oct 2nd, 2008, 10:37am
 
Tried to search for this and have got limited success, but really not getting it. Looked at the blend & mask functions but can't figure them out.

I was to load an image of a crosshair which has an png alpha channel, that I can then move around with the mouse.


Has anyone got a small example of loading a png with an alpha channel I can use as a starting point?
Re: Transparent PNG
Reply #1 - Oct 3rd, 2008, 9:39am
 
PImage mypic;
mypic = loadImage("mypic.png");
image(mypic, 0, 0);


Re: Transparent PNG
Reply #2 - Oct 3rd, 2008, 11:01am
 
You know, I don't know what I was doing yesterday, but that wasn't working for me.

*hangs head in shame*

Thanks very much!
Re: Transparent PNG
Reply #3 - Oct 3rd, 2008, 5:17pm
 
make sure you save out PNG with ahpha channel 32 bit format.  If still problems then try 32 bit TGA and create an alpha channel from within photoshop - so that you have your 3 RGB channels plus an alpha.
Page Index Toggle Pages: 1