if (i == 0) Integer.toString(alpha);
if (i == 0) { String fix = "" + alpha; }
        BufferedImage assignment() {            colorMap = new byte[4][numColors];            if (addTransparency) {                // if a transparency color is added, firstColor was set to 1,                // so color 0 can be used for this                colorMap[0][0] = 0;                colorMap[1][0] = 0;                colorMap[2][0] = 0;                colorMap[3][0] = 0;            }            numColors = firstColor;            root.mapColors();            // determine bit depth for palette            int depth;            for (depth = 1; depth <= 8; depth++)                if ((1 << depth) >= numColors)                    break;            // create the right color model, depending on transparency settings:            IndexColorModel icm;            if (alphaToBitmask) {                if (addTransparency)                    icm = new IndexColorModel(depth, numColors, colorMap[0],                        colorMap[1], colorMap[2], 0);                else                    icm = new IndexColorModel(depth, numColors, colorMap[0],                        colorMap[1], colorMap[2]);            } else {                icm = new IndexColorModel(depth, numColors, colorMap[0],                    colorMap[1], colorMap[2], colorMap[3]);            }            // create the indexed BufferedImage:            BufferedImage dest = new BufferedImage(source.getWidth(),                source.getHeight(), BufferedImage.TYPE_BYTE_INDEXED, icm);            boolean firstOut = true;            if (dither)                new DiffusionFilterOp().filter(source, dest);            else {                Search search = new Search();                // convert to indexed color                byte[] dst = ((DataBufferByte) dest.getRaster().getDataBuffer()).getData();                for (int i = 0; i < pixels.length; i++) {                    int pixel = pixels[i];                    int red = (pixel >> 16) & 0xff;                    int green = (pixel >> 8) & 0xff;                    int blue = (pixel >> 0) & 0xff;                    int alpha = (pixel >> 24) & 0xff;                    if (alphaToBitmask)                        alpha = alpha < 128 ? 0 : 0xff;                                        // this is super weird: on some systems, transparent pixels are                    // not calculated correctly if the following line is taken out.                    // the bug is very strange, isn't related to the code (compiler error?)                    // but doesn't allways happen. as soon as it does, though, it doesn't                    // seem to want to go away.                    // This happened at various times on my two different debian systems                    // and i never found out how to really fix it. the following line seems to                    // prevent it from happening, but i wonder wether there's a better way                    // to fix it.                     // it looks as if the command forces alpha to take on correct values.                    // Until now I only knew of effects like that in quantum mechanics...                    if (i == 0) Integer.toString(alpha);                    if (alpha == 0 && addTransparency) {                        dst[i] = 0; // transparency color is at 0                    } else {                        // walk the tree to find the cube containing that color                        Node node = root;                        for (;;) {                            int id = (((red > node.midRed ? 1 : 0) << 0)                                | ((green > node.midGreen ? 1 : 0) << 1)                                | ((blue > node.midBlue ? 1 : 0) << 2) | ((alpha > node.midAlpha ? 1                                : 0) << 3));                            if (node.children[id] == null) {                                break;                            }                            node = node.children[id];                        }                        if (QUICK) {                            // if QUICK is set, just use that                            // node. Strictly speaking, this isn't                            // necessarily best match.                            dst[i] = (byte) node.colorIndex;                        } else {                            // Find the closest color.                            search.distance = Integer.MAX_VALUE;                            node.parent.closestColor(red, green, blue, alpha,                                search);                            dst[i] = (byte) search.colorIndex;                        }                    }                }            }            return dest;        }