} else {  copySupportedImageToImageData(ri, ri.getMinX(), ri.getMinY(), 0, 0, depthIndex, data.dataWidth, data.dataHeight, data);
}  if((imageData == data) && (imageDataPowerOfTwo != null)) { updateImageDataPowerOfTwo(depthIndex);
    void copySupportedImageToImageData(RenderedImage ri, int depthIndex, ImageData data) {                if (ri instanceof BufferedImage) {            if(yUp) {                /*  Use quick block copy when  ( format is OK, Yup is true, and byRef is false). */                // System.err.println("ImageComponentRetained.copySupportedImageToImageData() : (imageTypeSupported && !byReference && yUp) --- (2 BI)");                copyImageByBlock((BufferedImage)ri, depthIndex, data);            } else {                /*  Use quick inverse line by line copy when (format is OK and Yup is false). */                // System.err.println("ImageComponentRetained.copySupportedImageToImageData() : (imageTypeSupported && !yUp) --- (3 BI)");                copyImageLineByLine((BufferedImage)ri, 0, 0, 0, 0, depthIndex, data.dataWidth, data.dataHeight, data);            }        } else {            // System.err.println("ImageComponentRetained.copySupportedImageToImageData() : (imageTypeSupported && !byReference ) --- (2 RI)");            copySupportedImageToImageData(ri, ri.getMinX(), ri.getMinY(), 0, 0, depthIndex, data.dataWidth, data.dataHeight, data);                         /*              * An alternative approach.              *            // Create a buffered image from renderImage            ColorModel cm = ri.getColorModel();            WritableRaster wRaster = ri.copyData(null);            BufferedImage bi = new BufferedImage(cm,                                                 wRaster,                                                 cm.isAlphaPremultiplied()                                                 ,null);                          copySupportedImageToImageData((BufferedImage)ri, 0, 0, 0, 0, depthIndex, data.dataWidth, data.dataHeight, data);                            *              *              */        }    }