Here you can find the source of roate90(BufferedImage src)
public static BufferedImage roate90(BufferedImage src)
//package com.java2s; //License from project: Open Source License import java.awt.image.BufferedImage; public class Main { public static BufferedImage roate90(BufferedImage src) { int width = src.getWidth(); int height = src.getHeight(); BufferedImage bRotate = new BufferedImage(height, width, src.getType()); for (int x = 0; x < width; x++) for (int y = 0; y < height; y++) bRotate.setRGB(height - 1 - y, x, src.getRGB(x, y)); return bRotate; }/*from w ww.j ava2 s . c om*/ }