ImageMagick.MagickScript.ExecuteSharpen C# (CSharp) Method

ExecuteSharpen() private method

private ExecuteSharpen ( XmlElement element, MagickImage image ) : void
element XmlElement
image MagickImage
return void
    private void ExecuteSharpen(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 == "radius")
          arguments["radius"] = Variables.GetValue<double>(attribute);
        else if (attribute.Name == "sigma")
          arguments["sigma"] = Variables.GetValue<double>(attribute);
      }
      if (arguments.Count == 0)
        image.Sharpen();
      else if (OnlyContains(arguments, "channels"))
        image.Sharpen((Channels)arguments["channels"]);
      else if (OnlyContains(arguments, "radius", "sigma"))
        image.Sharpen((double)arguments["radius"], (double)arguments["sigma"]);
      else if (OnlyContains(arguments, "radius", "sigma", "channels"))
        image.Sharpen((double)arguments["radius"], (double)arguments["sigma"], (Channels)arguments["channels"]);
      else
        throw new ArgumentException("Invalid argument combination for 'sharpen', allowed combinations are: [] [channels] [radius, sigma] [radius, sigma, channels]");
    }
    private void ExecuteShave(XmlElement element, MagickImage image)
MagickScript