Totally weird color bug

In Rimscape, you can drop cargo into space. When you do so, a little image is positioned and rotated and drawn thanks to the help of an AffineTransform object. However, with it I’m experiencing a bug I can’t explain.

If I render with this method:


BufferedImage cImage = Rimscape.getMediaItem(Constants.MOBS, Constants.CARGO);
                  Rimscape.TRANS.setTransform(1, 0, 0, 1, 
                              x - screen.getX() - cImage.getWidth()/2,
                              y - screen.getY() - cImage.getHeight()/2);
                  
                  Rimscape.TRANS.rotate(theta, cImage.getWidth()/2, cImage.getHeight()/2);
                  
                  g2d.drawImage(cImage, Rimscape.TRANS, null);

the image becomes very purple, and looks to have its opacity set to like 30%. If I draw it with this:


g2d.drawImage(cImage,
                          (int)( x - screen.getX() - cImage.getWidth()/2 ),
                          (int)( y - screen.getY() - cImage.getHeight()/2 ),
                          null);

Then there’s no problem at all, and the image remains in its original color and opacity state. What the heck could be causing this and how do I make it stop?

Note that I draw with the Graphics2D.drawImage(Image, AffineTransform, ImageObserver) method ALL over Rimscape, and this doesn’t happen for any other instance of the call in the game. Also, if I draw with a different image the error doesn’t occur. It seems to be specific to this one image.

EDIT: This happens in both 1.4.2_06 and 1.5.1

I suggest to post a little test case together with that image.

I think you may be running into a known bug. What’s the image bit depth?