uGIF.NeuQuant.NeuQuant C# (CSharp) Method

NeuQuant() public method

public NeuQuant ( Color32 thepic, int len, int sample ) : System
thepic UnityEngine.Color32
len int
sample int
return System
        public NeuQuant(Color32[] thepic, int len, int sample)
        {
            int i;
            int[] p;

            thepicture = thepic;
            lengthcount = len;
            samplefac = sample;

            network = new int[netsize][];
            for (i = 0; i < netsize; i++) {
                network [i] = new int[4];
                p = network [i];
                p [0] = p [1] = p [2] = (i << (netbiasshift + 8)) / netsize;
                freq [i] = intbias / netsize; /* 1/netsize */
                bias [i] = 0;
            }
        }