public void transformImage( SunGraphics2D sg, BufferedImage img, BufferedImageOp op, int x, int y) { if (op != null) { if (op instanceof AffineTransformOp) { AffineTransformOp atop = (AffineTransformOp) op; transformImage(sg, img, x, y, atop.getTransform(), atop.getInterpolationType()); return; } else { img = op.filter(img, null); } } copyImage(sg, img, x, y, null); }