views:

348

answers:

1

This is a question that's been bugging me for some time now:

In photoshop/GIMP, there is a "screen" layer composition mode. This mode has bright colours have a strong alpha, and dark colours a weak one. Black is entirely transparent, white entirely opaque.

I would dearly love to be able to replicate this composite using Java 2D graphics, but my repeated attempts at trying to coax AlphaComposite into this have failed - and indeed I think this is outside of AlphaComposite's capabilities.

A visual example can be seen here .

Any ideas on how to do this?

+2  A: 

Looks like some reference code is here:

http://www.curious-creature.org/2006/09/20/new-blendings-modes-for-java2d/

jedierikb