// copying the data to ensure we don't have side effects when we clean the cache
pImage.copyData(wTile);
if (wTile.getMinX() != 0 || wTile.getMinY() != 0) {
tile = new BufferedImage(pImage.getColorModel(),
(WritableRaster) wTile.createTranslatedChild(0, 0), pImage.getColorModel()
.isAlphaPremultiplied(), null);
} else {
tile = new BufferedImage(pImage.getColorModel(), wTile, pImage.getColorModel()
.isAlphaPremultiplied(), null);
}