public static BufferedImage cloneImage ( BufferedImage image ) { BufferedImage newImage = new BufferedImage ( image . getWidth ( ) , image . getHeight ( ) , BufferedImage . TYPE_INT_ARGB ) ; Graphics2D g = newImage . createGraphics ( ) ; g . drawRenderedImage ( image , null ) ; g . dispose ( ) ; return newImage ; }
Clones a BufferedImage .