I'm currently designing Pac Man in java using swing. I have PNG images that are drawn on screen using the following statement.
wall = new ImageIcon(GamePanel.class.getResource("wall.png")).getImage();
g2d.drawImage(wall, x, y, this);
The problem I'm having is that it seems to render a very low colour depth rendition of the actual file. It seems like it does retain transparency (grey background is the Panel bg color), but it loses color depth.
The actual image looks like this: When running, it looks like this:
Does anyone have a solution? Thanks!