code: 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;
      }
docs: Apply an horizontal flip to the input image.
  
  @param image The input image buffer.
  @return The flipped image buffer as a new instance.