synchronized (consumers) { RenderedImage newImage; if (context == null) newImage = image.createDefaultRendering(); else newImage = image.createRendering(context); Raster newData = newImage.getData(); ColorModel colorModel = newImage.getColorModel(); if (colorModel == null) colorModel = ColorModel.getRGBdefault(); SampleModel sampleModel = newData.getSampleModel(); DataBuffer dataBuffer = newData.getDataBuffer(); int width = newData.getWidth(); int height = newData.getHeight();   Iterator it = consumers.iterator(); while (it.hasNext()) { ImageConsumer target = (ImageConsumer) it.next(); target.setHints(ImageConsumer.COMPLETESCANLINES | ImageConsumer.SINGLEFRAME | ImageConsumer.SINGLEPASS | ImageConsumer.TOPDOWNLEFTRIGHT); target.setDimensions(width, height); }   int[] newLine = new int[width]; int[] bands = new int[sampleModel.getNumBands()]; for (int y = 0; y < height; ++y) { for (int x = 0; x < width; ++x) { sampleModel.getPixel(x, y, bands, dataBuffer); newLine[x] = colorModel.getDataElement(bands, 0); }   it = consumers.iterator(); while (it.hasNext()) { ImageConsumer target = (ImageConsumer) it.next(); target.setPixels(0, y, width, 1, colorModel, newLine, 0, width); } }   it = consumers.iterator(); while (it.hasNext()) { ImageConsumer target = (ImageConsumer) it.next(); target.imageComplete(ImageConsumer.STATICIMAGEDONE); } }
  public void run()    throws NotImplementedException  {  }