Here you can find the source of rotateMyImage(BufferedImage img, double angle)
public static BufferedImage rotateMyImage(BufferedImage img, double angle)
//package com.java2s; //License from project: Apache License import java.awt.image.BufferedImage; public class Main { public static BufferedImage rotateMyImage(BufferedImage img, double angle) { int width = img.getWidth(); int height = img.getHeight(); BufferedImage newImage = new BufferedImage(height, width, img.getType());/* w w w.j av a 2 s . com*/ for (int i = 0; i < width; i++) for (int j = 0; j < height; j++) newImage.setRGB(height - 1 - j, i, img.getRGB(i, j)); return newImage; } }