ImageMagick.MagickColorCollection.ToDictionary C# (CSharp) Метод

ToDictionary() публичный статический Метод

public static ToDictionary ( IntPtr list, int length ) : int>.Dictionary
list System.IntPtr
length int
Результат int>.Dictionary
    public static Dictionary<MagickColor, int> ToDictionary(IntPtr list, int length)
    {
      Dictionary<MagickColor, int> colors = new Dictionary<MagickColor, int>();

      if (list == IntPtr.Zero)
        return colors;

      for (int i = 0; i < length; i++)
      {
        IntPtr instance = NativeMagickColorCollection.GetInstance(list, i);
        MagickColor color = MagickColor.CreateInstance(instance);
        if (color != null)
          colors[color] = color.Count;
      }

      return colors;
    }
  }
MagickColorCollection