ImageMagick.MagickScript.ExecuteChop C# (CSharp) Метод

ExecuteChop() приватный Метод

private ExecuteChop ( XmlElement element, MagickImage image ) : void
element System.Xml.XmlElement
image MagickImage
Результат void
    private void ExecuteChop(XmlElement element, MagickImage image)
    {
      Hashtable arguments = new Hashtable();
      foreach (XmlAttribute attribute in element.Attributes)
      {
        if (attribute.Name == "geometry")
          arguments["geometry"] = Variables.GetValue<MagickGeometry>(attribute);
        else if (attribute.Name == "height")
          arguments["height"] = Variables.GetValue<Int32>(attribute);
        else if (attribute.Name == "width")
          arguments["width"] = Variables.GetValue<Int32>(attribute);
        else if (attribute.Name == "xOffset")
          arguments["xOffset"] = Variables.GetValue<Int32>(attribute);
        else if (attribute.Name == "yOffset")
          arguments["yOffset"] = Variables.GetValue<Int32>(attribute);
      }
      if (OnlyContains(arguments, "geometry"))
        image.Chop((MagickGeometry)arguments["geometry"]);
      else if (OnlyContains(arguments, "xOffset", "width", "yOffset", "height"))
        image.Chop((Int32)arguments["xOffset"], (Int32)arguments["width"], (Int32)arguments["yOffset"], (Int32)arguments["height"]);
      else
        throw new ArgumentException("Invalid argument combination for 'chop', allowed combinations are: [geometry] [xOffset, width, yOffset, height]");
    }
    private void ExecuteChopHorizontal(XmlElement element, MagickImage image)
MagickScript