Here you can find the source of flipImage(BufferedImage image)
private static BufferedImage flipImage(BufferedImage image)
//package com.java2s; //License from project: Open Source License import java.awt.geom.AffineTransform; import java.awt.image.AffineTransformOp; import java.awt.image.BufferedImage; public class Main { private static BufferedImage flipImage(BufferedImage image) { AffineTransform tx = AffineTransform.getScaleInstance(-1, 1); tx.translate(-(image.getWidth(null)), 0); AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR); return op.filter(image, null); }/*from w w w . ja v a 2s . c o m*/ }