Java examples for 2D Graphics:BufferedImage
deep Copy BufferedImage
//package com.java2s; import java.awt.image.*; public class Main { public static BufferedImage deepCopy(BufferedImage bi) { ColorModel cm = bi.getColorModel(); boolean isAlphaPremultiplied = cm.isAlphaPremultiplied(); WritableRaster raster = bi.copyData(null); return new BufferedImage(cm, raster, isAlphaPremultiplied, null); }/* w ww. j a v a 2 s. co m*/ }