return createCompatibleRaster(raster);
return createCompatibleRaster(raster, r_image.getColorModel());
	private Raster getCompatibleRaster(Image image) throws InterruptedException {		final ColorModel dstModel = surface.getColorModel();		if (image instanceof BufferedImage) {			// We have a direct raster			final Raster raster = ((BufferedImage) image).getRaster();			if (dstModel.isCompatibleRaster(raster)) {				// Raster is compatible, return without changes				return raster;			} else {				// Convert it into a compatible raster				return createCompatibleRaster(raster);			}		} else if (image instanceof RenderedImage) {				// We have a direct raster				final Raster raster = ((RenderedImage) image).getData();				if (dstModel.isCompatibleRaster(raster)) {					// Raster is compatible, return without changes					return raster;				} else {					// Convert it into a compatible raster					return createCompatibleRaster(raster);				}		} else {			// Convert it to a raster			final PixelGrabber grabber = new PixelGrabber(image, 0, 0, -1, -1, true);			if (grabber.grabPixels()) {				final int w = grabber.getWidth();				final int h = grabber.getHeight();				final WritableRaster raster = dstModel.createCompatibleWritableRaster(w, h);				final int[] pixels = (int[]) grabber.getPixels();				Object dataElems = null;				for (int y = 0; y < h; y++) {					final int ofsY = y * w;					for (int x = 0; x < w; x++) {						final int rgb = pixels[ofsY + x];						dataElems = dstModel.getDataElements(rgb, dataElems);						raster.setDataElements(x, y, dataElems);					}				}				return raster;			} else {				throw new IllegalArgumentException("Cannot grab pixels");			}		}	}