Esempio n. 1
0
        /// <summary>
        ///     Gets the index of the palette for specific color.
        /// </summary>
        /// <param name="color">The color.</param>
        /// <returns></returns>
        public int GetPaletteIndex(Color color)
        {
            color = QuantizationHelper.ConvertAlpha(color);

            // retrieves a palette index
            return(_root.GetPaletteIndex(color, 0));
        }
Esempio n. 2
0
 /// <summary>
 ///     Adds the color to quantizer.
 /// </summary>
 /// <param name="color">The color to be added.</param>
 public void AddColor(Color color)
 {
     color = QuantizationHelper.ConvertAlpha(color);
     _root.AddColor(color, 0, this);
 }