protected void AnalyzePixels() { int length = this.pixels.Length; int num2 = length / 3; this.indexedPixels = new byte[num2]; NeuQuant quant = new NeuQuant(this.pixels, length, this.sample); this.colorTab = quant.Process(); int num3 = 0; for (int i = 0; i < num2; i++) { int index = quant.Map(this.pixels[num3++] & 0xff, this.pixels[num3++] & 0xff, this.pixels[num3++] & 0xff); this.usedEntry[index] = true; this.indexedPixels[i] = (byte)index; } this.pixels = null; this.colorDepth = 8; this.palSize = 7; if (this.transparent != Color.Empty) { this.transIndex = this.FindClosest(this.transparent); } }
protected void AnalyzePixels() { int length = this.pixels.Length; int num2 = length / 3; this.indexedPixels = new byte[num2]; NeuQuant quant = new NeuQuant(this.pixels, length, this.sample); this.colorTab = quant.Process(); int num3 = 0; for (int i = 0; i < num2; i++) { int index = quant.Map(this.pixels[num3++] & 0xff, this.pixels[num3++] & 0xff, this.pixels[num3++] & 0xff); this.usedEntry[index] = true; this.indexedPixels[i] = (byte) index; } this.pixels = null; this.colorDepth = 8; this.palSize = 7; if (this.transparent != Color.Empty) { this.transIndex = this.FindClosest(this.transparent); } }