// check to see if we have to see a translucent or bitmask quantizer
image = applyPalette(image, mapContent, "image/png8", true);
float quality = (100 - wms.getPngCompression()) / 100.0f;
JAIInfo.PngEncoderType encoder = wms.getPNGEncoderType();
if(encoder == JAIInfo.PngEncoderType.PNGJ) {
image = new PNGJWriter().writePNG(image, outStream, quality, mapContent);
RasterCleaner.addImage(image);
} else {
Boolean PNGNativeAcc = (encoder == JAIInfo.PngEncoderType.NATIVE);
SampleModel sm = image.getSampleModel();
int numBits = sm.getSampleSize(0);