code: public static BufferedImage copyImage(BufferedImage image)
      {
          final BufferedImage copy = createImage(image.getWidth(),
                                                 image.getHeight(),
                                                 image.getColorModel().getTransparency());
          final Graphics2D g = copy.createGraphics();
          g.setComposite(AlphaComposite.Src);
          g.drawImage(image, 0, 0, null);
          g.dispose();
          return copy;
      }
docs: Create an image.
  
  @param image The image reference.
  @return The image copy.