/// <summary> /// Gets the index of the palette for specific color. /// </summary> /// <param name="color">The color.</param> /// <returns></returns> public Int32 GetPaletteIndex(Color color) { color = QuantizationHelper.ConvertAlpha(color); // retrieves a palette index return(root.GetPaletteIndex(color, 0)); }
/// <summary> /// See <see cref="BaseColorQuantizer.OnGetPaletteIndex"/> for more details. /// </summary> protected override void OnGetPaletteIndex(TextureBitmap.Color color, Int32 key, Int32 x, Int32 y, out Int32 paletteIndex) { // retrieves a palette index paletteIndex = root.GetPaletteIndex(color, 0); }