public static BufferedImage flipHorizontal ( BufferedImage image ) { final int width = image . getWidth ( ) ; final int height = image . getHeight ( ) ; final BufferedImage flipped = createImage ( width , height , image . getColorModel ( ) . getTransparency ( ) ) ; final Graphics2D g = flipped . createGraphics ( ) ; optimizeGraphicsSpeed ( g ) ; g . drawImage ( image , 0 , 0 , width , height , width , 0 , 0 , height , null ) ; g . dispose ( ) ; return flipped ; }
Apply an horizontal flip to the input image .