I have an image and I have to rotate it by 45, 90, 135, 180 degrees. What I am doing:
try { BufferedImage src = ImageIO.read(new File(\"src.png\"));
I suggest to replace
AffineTransformOp op = new AffineTransformOp(t, null);
with
AffineTransformOp op = new AffineTransformOp(t, AffineTransformOp.TYPE_BILINEAR);
It will improve a lot the quality of the output.