.getRenderedImage();
ColorIndexer indexer = null;
// user provided palette?
if (mapContent.getPalette() != null) {
indexer = new CachingColorIndexer(new LRUColorIndexer(icm, 1024));
} else if (palettedFormatName.equalsIgnoreCase(format)) {
// build the palette and grab the optimized color indexer
indexer = new Quantizer(256).subsample().buildColorIndexer(image);
}