// this copies to RGBA static BufferedImage copyImage(Image img) { if (img == null) null; if (img cast BufferedImage) ret copyImage(img); int w = img.getWidth(null), h = img.getHeight(null); BufferedImage bi = newBufferedImage(w, h); drawImage(bi, img); ret bi; } // this one stays in color model. inconsistent i guess static BufferedImage copyImage(BufferedImage bi) { if (bi == null) null; ColorModel cm = bi.getColorModel(); boolean isAlphaPremultiplied = cm.isAlphaPremultiplied(); WritableRaster raster = bi.copyData(bi.getRaster().createCompatibleWritableRaster()); return new BufferedImage(cm, raster, isAlphaPremultiplied, null); }