}
}
private void process(Paletted8Image in, Paletted8Image out)
{
Palette inPal = in.getPalette();
Palette outPal = out.getPalette();
int[] orig = new int[3];
int[] adjusted = new int[3];
final int MAX = inPal.getMaxValue();
final int WIDTH = in.getWidth();
final int HEIGHT = in.getHeight();
for (int i = 0; i < inPal.getNumEntries(); i++)
{
orig[INDEX_RED] = inPal.getSample(INDEX_RED, i);
orig[INDEX_GREEN] = inPal.getSample(INDEX_GREEN, i);
orig[INDEX_BLUE] = inPal.getSample(INDEX_BLUE, i);
adjust(orig, adjusted, MAX);
outPal.putSample(INDEX_RED, i, adjusted[INDEX_RED]);
outPal.putSample(INDEX_GREEN, i, adjusted[INDEX_GREEN]);
outPal.putSample(INDEX_BLUE, i, adjusted[INDEX_BLUE]);
}
for (int y = 0; y < HEIGHT; y++)
{
for (int x = 0; x < WIDTH; x++)
{