public BufferedImage toNewBufferedImage ( int type ) { BufferedImage target = new BufferedImage ( width , height , type ) ; Graphics2D g2 = ( Graphics2D ) target . getGraphics ( ) ; g2 . drawImage ( awt , 0 , 0 , null ) ; g2 . dispose ( ) ; return target ; }
Returns a new AWT BufferedImage from this image .