// With index color model we want just the first band
//
// /////////////////////////////////////////////////////////////////////
if (image.getColorModel() instanceof IndexColorModel
&& (image.getSampleModel().getNumBands() > 1)) {
worker.retainBands(1);
image = worker.getRenderedImage();
}
/**
* For the moment we do not work with DirectColorModel but instead we