private void createBilevelFromPaletted(Paletted8Image in)
{
Palette palette = in.getPalette();
MemoryBilevelImage out = new MemoryBilevelImage(in.getWidth(), in.getHeight());
out.clear(BilevelImage.BLACK);
for (int y = 0; y < in.getHeight(); y++)
{
for (int x = 0; x < in.getWidth(); x++)
{
if (palette.getSample(RGBIndex.INDEX_RED, in.getSample(0, x, y)) != 0)