Image effects on awt.Graphics, like greyscale

Now I want to use some Image effects on the whole screen.
something like inverting the colors or greyscale.
I know this is quite easy to do with Images(Buffered / Votile), but it is of course very slow.

In my code I essentially use

BufferStrategy.getDrawGraphics()

to draw everything on, I never use a Image (Image.getGraphics())
so alone that is slow beyond believe

but anyway, can you not use those effects on Graphics directly somehow ?

Like I draw everything on it like normal and then graphics = greyscale(graphics);
or something

You could create your own composite. It works with graphics, but it’s not very fast either.

More here: http://www.koders.com/java/fid8123F2932CF29B37E3503233002DBBD9446953F8.aspx?s=colorcomposite

ya I wanted to use it like: when you die in my game the screen would greyscale slowly or something

just seems impossible without dropping 40 fps or something like that ^^

Well, you could always make the slowing down an intentional part of the effect. When you die, everything slows to a stop as it fades to grey.

For darkness I used a transparent square, I didn’t really see any performance lost.
Then I moved to a 32bit png for darkness and that was ok for me too.(3% cpu increase at 30fps)
Though my game window was a little small.

Ya… I guess I could. well right now its like 10 fps so I got to push it a little, but the idea MAY work overall :o

well… 1024x768x60fps here
also darkness is not really an issue, its something else when you want to invert colors or greyscale