int subsy = 1 + (int) (Math.log(image.getHeight()) / Math.log(32));
if (LOGGER.isLoggable(Level.FINER)) {
LOGGER.finer("CustomPaletteBuilder[subsx="+subsx+",subsy="+subsy+"]");
LOGGER.finer("InputImage is:"+image.toString());
}
CustomPaletteBuilder cpb=new CustomPaletteBuilder(image, 256, subsx, subsy, 1).buildPalette();
image = cpb.getIndexedImage();
if (LOGGER.isLoggable(Level.FINER)) {
LOGGER.finer("Computed Palette:"+paletteRepresentation(cpb.getIndexColorModel()));
}
if(DEBUG){
writeRenderedImage(image, "buildPalette");
}
}