There is now a demo in the media/platimg addon, load 'media/platimg/test/transparency'
which works nicely on Windows and show smooth alpha values. On Mac there the PNG does not return the alpha channel, so a simpler logic is used to cut off 1-bit background. > From: June Kim <[email protected]> > > On Sat, Feb 6, 2010 at 2:24 PM, Oleg Kobchenko wrote: > >> From: June Kim > > > >> > >> Is there anyway to set the alpha value(transparency) with gl2? > > > > First of all, thanks for answering my question, Oleg. > > > I don't think transparency is supported by gl2 directly, > > but it should be easy to achieve though bitblt (glqpixels, glpixels). > > Could you give me a simple running example of using it, please? > > > > > See "Image Operations" in J Wiki > > > > http://www.jsoftware.com/jwiki/OlegKobchenko/Image%20Operations > > > > Basically, for a color component, transparency is weighted sum, > > the complement of which to 1 is opacity. > > > > C = F*O + B*(1 - O) > > > > C is the new color component value > > B is the background value (0..1) > > F is the foreground value (0..1) > > O is the foreground opacity (0..1) ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
