private void Mark(Box cube, int label, int tag[]) {
    		int r, g, b;

    		for(r = cube.r0 + 1; r <= cube.r1; ++r)
    			for(g = cube.g0 + 1; g <= cube.g1; ++g)
    				for(b = cube.b0 + 1; b <= cube.b1; ++b)
    					tag[(r<<10) + (r<<6) + r + (g<<5) + g + b] = label;
    	}
Java port of
C Implementation of Wu's Color Quantizer (v. 2)
(see Graphics Gems vol. II, pp. 126-133)
Author:	Xiaolin Wu
Dept. of Computer Science
Univ. of Western Ontario
London, Ontario N6A 5B7
wu@csd.uwo.ca

Algorithm: Greedy orthogonal bipartition of RGB space for variance
minimization aided by inclusion-exclusion tricks.
For speed no nearest neighbor search is done. Slightly
better performance can be expected by more sophisticated
but more expensive versions.

The author thanks Tom Lane at Tom_Lane@G.GP.CS.CMU.EDU for much of
additional documentation and a cure to a previous bug.

Free to distribute, comments and suggestions are appreciated.
subs/gif-revert/src/main/java/com/engineer/gif/revert/lib/AnimatedGIFWriter.java