Here you can find the source of rotateImageLeft90( BufferedImage bufferedimage)
public static BufferedImage rotateImageLeft90( BufferedImage bufferedimage)
//package com.java2s; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.image.BufferedImage; public class Main { public static BufferedImage rotateImageLeft90( BufferedImage bufferedimage) { int w = bufferedimage.getWidth(); int h = bufferedimage.getHeight(); int type = bufferedimage.getColorModel().getTransparency(); BufferedImage img;// ww w.j av a 2 s . c o m Graphics2D graphics2d; (graphics2d = (img = new BufferedImage(h, w, type)) .createGraphics()).setRenderingHint( RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); graphics2d.rotate(Math.toRadians(270), w / 2, h / 2 + (w - h) / 2); graphics2d.drawImage(bufferedimage, 0, 0, null); graphics2d.dispose(); return img; } }