System.arraycopy(newTransformedColors, 0, transformedColors, 0, PALETTE_SIZE);
newTransformedColors = null;
}
SimpleImage img = new RGBPaletteRenderer().renderHorizPalette(transformedColors, PALETTE_SIZE, 1);
if (modRed != 0 || modGreen != 0 || modBlue != 0 || modContrast != 0 || modGamma != 0 || modBrightness != 0 || modSaturation != 0) {
BalancingTransformer bT = new BalancingTransformer();
bT.setRed(modRed);
bT.setGreen(modGreen);
bT.setBlue(modBlue);
bT.setContrast(modContrast);
bT.setGamma(modGamma);
bT.setBrightness(modBrightness);
bT.setSaturation(modSaturation);
bT.transformImage(img);
}
if (modHue != 0) {
HSLTransformer hT = new HSLTransformer();
hT.setHue(modHue);
hT.transformImage(img);