I am drawing a Bufferedimage
BufferedImage map = ImageIO.read(getClass().getResource("map.png"));
but I would like to either a) put a whiter filter on top, or b) change the alpha value so that it's not as bright. I've tried
for (int x = 0; x < map.getWidth(); x++) {
for (int y = 0; y < map.getHeight(); y++)
{
int tempcolor = map.getRGB(x, y);
int newalpha = (60 << 24) | (tempcolor & 0x00ffffff);
map.setRGB(x, y, newalpha);
}
}
g.drawImage(map, 0, 0, this);
but the image looks exactly like the original. Any ideas?