Here you can find the source of deepCopy(BufferedImage bi)
public static BufferedImage deepCopy(BufferedImage bi)
//package com.java2s; //License from project: Open Source License 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 w w . j a v a2 s.c o m }