This method does not rotate the bufferedImage around its center :(

Hai!

I got this method from my old codes, I assumed it rotated the image around its center.

But it really dont..

The image doesnt move, but the car does :(

How come?

Here my method:

Code:

` public static BufferedImage rotateImg(BufferedImage bufferedImage,double radians){`

double radians2 = radians*Math.PI/180;

radians = (int)radians2;

AffineTransform tx = new AffineTransform();

tx.rotate(radians2, bufferedImage.getWidth()/2, bufferedImage.getHeight()/2);

AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_BILINEAR);

bufferedImage = op.filter(bufferedImage, null);

return bufferedImage;

}