// The image is indexed on 8 bits and the color model is
// Translucent, we have to perform some color operations in
// order to convert it to bitmask.
//
// //
image = new ImageWorker(originalImage)
.forceBitmaskIndexColorModel().getRenderedImage();
}
} else {
// /////////////////////////////////////////////////////////////////
//
// NOT IndexColorModel and DataBuffer.TYPE_BYTE
//
// ///
//
// We got an image that needs to be converted.
//
// /////////////////////////////////////////////////////////////////
if (invColorMap != null) {
// make me parametric which means make me work with other image
// types
image = invColorMap.filterRenderedImage(originalImage);
} else {
// //
//
// We do not have a paletteInverter, let's create a palette that
// is as good as possible.
//
// //
// make sure we start from a componentcolormodel.
image = new ImageWorker(originalImage)
.forceComponentColorModel().getRenderedImage();
// //
//
// Build the CustomPaletteBuilder doing some good subsampling.