creating transparent image with localgraphicsconfig

Hi all,

Consider using the following, commented-out code (https://github.com/kozie/twodee/blob/master/src/nl/kozie/twodee/Display.java#L136).
This creates an empty image which i’m filling with a mosaic pattern later on in the code.

This seems to work like a charm on my iMac using the latest OSX.
When i switch (bootcamp) to Windows 7, the transparency doesn’t work (just opaque images).
Is there something i’m missing?

I’m using Java 1.7.0_03 on Windows 7 (64)

I’m actually not quite sure if it’s necessary to render the image using the localGraphicsConfiguration since the image/layer with the mosaic will never change.

I hope someone can help me with this.

Thanks in advance

EDIT
Here is a screenshot with the results im getting.

The grey pixels and the trees in the middle are drawn in the background BufferedImage.
The effect making the pixels seem like mosaic is a second BufferedImage drawn over the first one (with the trees etc).

The window on the left is using the regular BufferedImage construction (https://github.com/kozie/twodee/blob/master/src/nl/kozie/twodee/Display.java#L135) Whilst the window on the right is using the createCompatibleImage construction (https://github.com/kozie/twodee/blob/master/src/nl/kozie/twodee/Display.java#L136)

Bump, please. Anyone :slight_smile: