ImageMagick.MagickScript.ExecuteBitDepth C# (CSharp) Method

ExecuteBitDepth() private method

private ExecuteBitDepth ( XmlElement element, MagickImage image ) : void
element System.Xml.XmlElement
image MagickImage
return void
    private void ExecuteBitDepth(XmlElement element, MagickImage image)
    {
      Hashtable arguments = new Hashtable();
      foreach (XmlAttribute attribute in element.Attributes)
      {
        if (attribute.Name == "channels")
          arguments["channels"] = Variables.GetValue<Channels>(attribute);
        else if (attribute.Name == "value")
          arguments["value"] = Variables.GetValue<Int32>(attribute);
      }
      if (OnlyContains(arguments, "channels", "value"))
        image.BitDepth((Channels)arguments["channels"], (Int32)arguments["value"]);
      else if (OnlyContains(arguments, "value"))
        image.BitDepth((Int32)arguments["value"]);
      else
        throw new ArgumentException("Invalid argument combination for 'bitDepth', allowed combinations are: [channels, value] [value]");
    }
    private void ExecuteBlackThreshold(XmlElement element, MagickImage image)
MagickScript