if ((status == IMAGEERROR) || (status == IMAGEABORTED)) {
consumer.imageComplete (status);
return;
} else {
int xWidth = imageWidth / iterations;
if (xWidth <= 0)
xWidth = 1;
int newPixels[] = new int [xWidth*imageHeight];
int iColor = overlapColor.getRGB();
for (int x=0;x<(xWidth*imageHeight);x++)
newPixels[x] = iColor;
int t=0;
for (;t<(imageWidth-xWidth);t+=xWidth) {
consumer.setPixels(t, 0, xWidth, imageHeight,
ColorModel.getRGBdefault(), newPixels, 0, xWidth);
consumer.imageComplete (ImageConsumer.SINGLEFRAMEDONE);
try {
Thread.sleep (delay);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
int left = imageWidth-t;
if (left > 0) {
consumer.setPixels(imageWidth-left, 0, left, imageHeight,
ColorModel.getRGBdefault(), newPixels, 0, xWidth);
consumer.imageComplete (ImageConsumer.SINGLEFRAMEDONE);
}
consumer.imageComplete (STATICIMAGEDONE);
}