Here you can find the source of rotateImage180(BufferedImage image, final int bufferedImageType)
public static BufferedImage rotateImage180(BufferedImage image, final int bufferedImageType)
//package com.java2s; /*/*from w w w .ja v a 2s. co m*/ * Copyright 2000-2013 Enonic AS * http://www.enonic.com/license */ import java.awt.image.BufferedImage; public class Main { public static BufferedImage rotateImage180(BufferedImage image, final int bufferedImageType) { return rotateImage90(rotateImage90(image, bufferedImageType), bufferedImageType); } public static BufferedImage rotateImage90(BufferedImage image, final int bufferedImageType) { int width = image.getWidth(); int height = image.getHeight(); BufferedImage destImage = new BufferedImage(height, width, bufferedImageType); for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { destImage.setRGB(height - 1 - j, i, image.getRGB(i, j)); } } return destImage; } }