*/
protected RenderedImage applyPalette(RenderedImage image, WMSMapContent mapContent,
String palettedFormatName, boolean supportsTranslucency) {
// check to see if we have to see a translucent or bitmask quantizer
GetMapRequest request = mapContent.getRequest();
QuantizeMethod method = (QuantizeMethod) request.getFormatOptions().get(
PaletteManager.QUANTIZER);
boolean useBitmaskQuantizer = method == QuantizeMethod.Octree
|| !supportsTranslucency
|| (method == null && image.getColorModel().getTransparency() != Transparency.TRANSLUCENT);