final RenderedImage gray = new ImageWorker(image).retainFirstBand()
.getRenderedImage();
image = new ImageWorker(gray).bandMerge(3).addBand(alpha, false)
.forceComponentColorModel().forceColorSpaceRGB().getRenderedImage();
} else {
image = iw.bandMerge(3).forceComponentColorModel().forceColorSpaceRGB()
.getRenderedImage();
}
} else if(!hasAlpha) {
// no transparency in the original data, so no need to expand to RGB
if(transparent) {