ok, after several requests to convert this 4K Game.( http://www.pkl.net/~rsc/4KShooter/4KShooter.jar)
So it doesn’t use the Windows only Experimental alpha trans.
I decided to do it. It was only 10mins work… and I ended up with this (note the lack of a cool blur effect ;P):-
http://www.pkl.net/~rsc/4KShooter/4KShooterSE.jar
and it runs perfectly on 1.4.2_03
I then tried it on the 1.5beta… and its bugged :-/
It seems that rotation AffineTransforms are screwing up the ColorModel of the destination image.
The source image is a managed Image (BITMASK),
The destination Image is a managed image (BITMASK).
When the rotation angle is anything but 0, the palette gets screwed up.
the sourcecode is available here (though I have to warn you its size optimised code :P):-
http://www.pkl.net/~rsc/4KShooter/A.java
To summarise, im doing this :-
//load the image
BufferedImage loadedImage = ImageIO.read(getClass().getResource(STRING_SHIPS_FILENAME));
//copy a portion of it into a smaller image
(objectImages[0][0] = gc.createCompatibleImage(IMAGE_WIDTH,IMAGE_HEIGHT, Transparency.BITMASK))
.createGraphics().drawImage(loadedImage,(IMAGE_WIDTH-SHIP_WIDTH)/2,(IMAGE_HEIGHT-SHIP_HEIGHT)/2,null);
//rotate the smaller image X times (pre-calc of rotation frames)
BufferedImage src = objectImages[0][0];
for(int i =0;i < NUM_ROTATIONS;i++)
{
(g = (objectImages[0][i] = gc.createCompatibleImage(IMAGE_WIDTH,IMAGE_HEIGHT,Transparency.BITMASK)).createGraphics())
.rotate(i*ANGLE_INC,IMAGE_WIDTH/2,IMAGE_HEIGHT/2);
g.drawImage(src,0,0,null);
}