I am looking for a way to draw a PNG image (with an alpha channel) in Java that has a shade of gray and then imposes a transparent color like green with an opacity of 75%, on top of it to change the color. To be clear, the resulting image will be straight the result of placing a transparent color on top of it and will not be the result of any special type of blending.
For example, I would draw the following image:

And then apply the RGB color (102, 255, 0, alpha) on top of the image:

The method of drawing color above the image should be such that it does not interfere with other images on the screen in the immediate vicinity. This will behave similarly to the Adobe Photoshop color overlay feature. Two images can have separate color overlays, but separate overlays will not conflict with eachother.
Thanks to leonbloy, I believe that AlphaComposit using "SRC_OVER" can solve this problem, I could then use the method to save the result as a new BufferedImage, which would prevent the overlay from affecting any other image objects on the screen.
I will post the results when I check this out.
source share